calculator.onl
Categories50

Linear interpolation calculator

Estimate a value between paired points or extend the nearest end segment.

A worked example

Move x past the last known point. Follow the marker onto the extension of the last segment.

Calculated y15Segment slope1Position typeInterpolationNumber of points2
X coordinates: 2; 4; 6. Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.

Y coordinates: 2; 4; 6. Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.

Target x: -1000000000000 … 1000000000000.

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

Calculated y

15

Calculated from your inputs

Segment slope1
Position typeInterpolation
Number of points2
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

The estimate follows the line joining the points around the requested input, so a new input can select a different segment. Change “Target x” from 5 to 15 and keep the other inputs from the worked example. The value for “Calculated y” goes from 15 to 25. For a related calculation, try Triangle calculator: SSS, SAS, ASA, AAS and SSA.

What to enter

InputWhat it meansExample value
X coordinatesX coordinates: 2; 4; 6. Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.0;20
Y coordinatesY coordinates: 2; 4; 6. Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.10;30
Target xTarget x: -1000000000000 … 1000000000000.5

How the calculation works

  1. Estimate a value between paired points or extend the nearest end segment.
  2. Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.
  3. Read the result and compare it with the diagram.
The formulay = y₁ + (x−x₁)(y₂−y₁)/(x₂−x₁)

A worked example

Linear interpolation calculator: (x₁,y₁) = (0,10); (x₂,y₂) = (20,30); x = 5 → y = 15; x = 30 → y = 40.

Example you can load

What to enter
Result for this example · Calculated y15

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.

Reference ·

Frequently asked questions

How is the result calculated?

Estimate a value between paired points or extend the nearest end segment. y = y₁ + (x−x₁)(y₂−y₁)/(x₂−x₁)

How should I enter the values?

X coordinates, Y coordinates, Target x. (x₁,y₁) = (0,10); (x₂,y₂) = (20,30); x = 5 → y = 15; x = 30 → y = 40.

What are the limits?

Enter 2–40 matching semicolon-separated coordinate lists in consistent units. Points are sorted by x; repeated x is rejected. Values beyond the table are marked extrapolation. The straight segments are a chosen approximation, not proof of a physical law.