CalcWorldHub
Free online calculator · no signup

Linear interpolation calculator

Interpolate or extrapolate a straight-line value from two points with distinct x coordinates.

A better way to figure it out
Clear
inputs.
∑
Clear result · useful details
Free calculatorNo signup ✓
Linear interpolation calculator — x₁, y₁, x₂ and calculation method
Linear interpolation calculator: inputs and calculation method.

How to use this calculator

Interpolate or extrapolate a straight-line value from two points with distinct x coordinates.

  1. Enter x₁, y₁, x₂, y₂, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How the Linear interpolation calculator works

Interpolate or extrapolate a straight-line value from two points with distinct x coordinates.

Inputs and units

  • x₁: First point x coordinate.
  • y₁: First point y coordinate.
  • x₂: Distinct second point x coordinate.
  • y₂: Second point y coordinate.
  • Target x: Target x coordinate, which may lie outside the endpoint interval.

Formula and method

y = y1 + (x−x1)(y2−y1)/(x2−x1)

Worked example

Points (2,10) and (8,34) give slope 4. At x=5 the value is 22; at x=9 the extrapolated value is 38.

Interpreting the result

Between the endpoints this is linear interpolation; outside them it is extrapolation and depends more strongly on the assumed line.

Assumptions and limits

x coordinates may have either order but must differ. The method assumes linear behavior and does not fit a curve or quantify uncertainty.

Frequently asked questions

Must x1 be smaller than x2?

No. Swapping the complete points leaves the same line.

Is an outside-interval result still interpolation?

No. It is extrapolation, so the linear assumption should be checked carefully.

How do I use the Linear interpolation calculator?

Enter x₁, y₁, x₂, y₂, then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Linear interpolation?

Points (2,10) and (8,34) give slope 4. At x=5 the value is 22; at x=9 the extrapolated value is 38.

What does the Linear interpolation calculator calculate?

Interpolate or extrapolate a straight-line value from two points with distinct x coordinates.