Quick answer
Linear interpolation estimates y between two known points: y = y₁ + (x − x₁)(y₂ − y₁) ÷ (x₂ − x₁). Between (0, 0) and (10, 100), x = 2.5 gives y = 25.
Enter two known points and the x value. The calculator returns the interpolated y.
Related tools: Linear Equation Calculator: Solve ax + b = c for x. Slope Calculator: Slope, angle, distance and line equation through two points. LCM Calculator: Least common multiple of two or more numbers.
How to use the Linear Interpolation Calculator
- Enter x₁.
- Enter y₁.
- Enter x₂.
- Enter y₂.
- Enter x to find y for.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| x₁ | A number | — |
| y₁ | A number | — |
| x₂ | A number | — |
| y₂ | A number | — |
| x to find y for | A number | — |
Formula and method
Formula
y = y₁ + (x − x₁)(y₂ − y₁) ÷ (x₂ − x₁)
IEEE-754 double precision; shown to at most 6 decimal places.
Straight-line interpolation (or extrapolation outside the range).
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: x₁ = 0; y₁ = 0; x₂ = 10; y₂ = 100; x to find y for = 2.5.
| Result | Value |
|---|---|
| Interpolated y | 25 |
Example 2
Inputs: x₁ = 1; y₁ = 3; x₂ = 3; y₂ = 7; x to find y for = 4.
| Result | Value |
|---|---|
| Interpolated y | 9 |
| Note | Extrapolated |
The first line is the headline result (interpolated y). IEEE-754 double precision; shown to at most 6 decimal places.
How it works
The point lies the fraction (x − x₁) ÷ (x₂ − x₁) = 0.25 of the way along, so y is 25% of the way from 0 to 100. This assumes a straight line between the points.
Use and caution
Use it to read values between table entries, such as steam tables or tax tables. It is only accurate if the true relationship is close to linear over the interval. Extrapolating outside the points is unreliable. x₁ must differ from x₂.
How the result changes with x₂
Holding every other input at the first worked example, this table changes only x₂. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| x₂ | Interpolated y |
|---|---|
| 5 | 50 |
| 10 | 25 |
| 20 | 12.5 |
| 40 | 6.25 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- x₂: entering "1" shows "x₁ and x₂ must differ." beside that field and no result.
Choosing between the Linear Interpolation Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Linear Equation Calculator](/math/linear-equation-calculator/) | a, b and c | x |
| [Slope Calculator](/math/slope-calculator/) | x₁, y₁ and x₂ | Slope |
| [LCM Calculator](/math/lcm-calculator/) | numbers | Least common multiple |
| [Factor Calculator](/math/factor-calculator/) | number | Factors |
| [Quadratic Formula Calculator](/math/quadratic-formula-calculator/) | a, b and c | Roots |
Background: algebra
Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.
If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.
Assumptions and limitations
- x₁ ≠ x₂
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for x₂ to confirm this.
Frequently asked questions
What is extrapolation?
Estimating beyond the known range.
Is interpolation exact?
Only for linear data.
Can I interpolate in a table?
Use the two nearest rows.
What does the Linear Interpolation Calculator calculate?
Interpolate a value between two known points. It returns Interpolated y.
What formula does the Linear Interpolation Calculator use?
y = y₁ + (x − x₁)(y₂ − y₁) ÷ (x₂ − x₁). Straight-line interpolation (or extrapolation outside the range).
What do I need to enter in the linear Interpolation Calculator?
You enter x₁, y₁, x₂, y₂ and x to find y for.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. x₁ ≠ x₂.
What is an example of a linear Interpolation result?
With x₁ 0, y₁ 0, x₂ 10, y₂ 100 and x to find y for 2.5, the interpolated y is 25.
Related calculators
- Linear Equation Calculator — Solve ax + b = c for x.
- Slope Calculator — Slope, angle, distance and line equation through two points.
- LCM Calculator — Least common multiple of two or more numbers.
- Factor Calculator — List every factor of a positive whole number.
- Quadratic Formula Calculator — Solve ax² + bx + c = 0, including complex roots.
- Log Calculator — Logarithm of a number to any base.
Sources
- OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.