Skip to content
CalculatorAtlas

Linear Interpolation Calculator

Tested

Interpolate a value between two known points.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

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

  1. Enter x₁.
  2. Enter y₁.
  3. Enter x₂.
  4. Enter y₂.
  5. Enter x to find y for.
  6. Press Calculate to see the result, and use Reset to start again.
Inputs of the Linear Interpolation Calculator
InputWhat to enterAllowed values
x₁A number—
y₁A number—
x₂A number—
y₂A number—
x to find y forA 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.

Results of example 1
ResultValue
Interpolated y25

Example 2

Inputs: x₁ = 1; y₁ = 3; x₂ = 3; y₂ = 7; x to find y for = 4.

Results of example 2
ResultValue
Interpolated y9
NoteExtrapolated

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.

How the result changes with x₂
x₂Interpolated y
550
1025
2012.5
406.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.

Choosing between the Linear Interpolation Calculator and similar calculators
CalculatorYou enterIt returns
[Linear Equation Calculator](/math/linear-equation-calculator/)a, b and cx
[Slope Calculator](/math/slope-calculator/)x₁, y₁ and x₂Slope
[LCM Calculator](/math/lcm-calculator/)numbersLeast common multiple
[Factor Calculator](/math/factor-calculator/)numberFactors
[Quadratic Formula Calculator](/math/quadratic-formula-calculator/)a, b and cRoots

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.

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.