Linear Interpolation Calculator
The linear interpolation calculator finds the y value at a position x between two known points. Example: between (10 | 20) and (30 | 60), x = 15 gives y = 30. Outside the points this is called extrapolation.
Example: Point 1: x₁ 10 · Point 1: y₁ 20 · Point 2: x₂ 30 · Point 2: y₂ 60 · Position x to find 15 · y value for the inverse 45 → Interpolated value: y(15) = 30. Source: Wikipedia – Linear interpolation. Updated: .
How it is calculated
Linear interpolation reads an unknown value between two known data points off the straight line connecting them. Typical use is looking up tables: if the value you need lies between two rows, you calculate in a straight line between them.
The formula
y = y₁ + (x − x₁) · (y₂ − y₁) / (x₂ − x₁). The fraction is the slope m of the line through both points. The share t = (x − x₁) / (x₂ − x₁) shows how far x lies between the points: 0 is point 1, 1 is point 2.
Example
Two table values: 20 units at 10 °C, 60 units at 30 °C. You want the value at 15 °C: t = (15 − 10) / 20 = 0.25, so y = 20 + 0.25 · 40 = 30. The line is y = 2x. Conversely, y = 45 is at x = 22.5.
Interpolation and extrapolation
Between the points the estimate is usually fine if the relationship is roughly linear. Outside (extrapolation) the line is simply extended; the further away, the less reliable. For curved relationships (interest or temperature curves, for example) you need closer data points or another model.
Frequently asked questions
How do you calculate a linear interpolation?
With y = y₁ + (x − x₁) · (y₂ − y₁) / (x₂ − x₁): find the slope between the two points and move from point 1 as far as x is from x₁.
What is the difference between interpolation and extrapolation?
In interpolation x lies between the known points, in extrapolation outside them. Extrapolating is much less reliable.
When is linear interpolation exact?
It is exact when the true relationship is a straight line. For curved relationships it is an approximation that improves with closer points.
Can I also find x from a given y?
Yes, the inverse is shown below the result: x = x₁ + (y − y₁) / m. It only works if the line is not horizontal.
Where is this used in everyday life?
For example when reading tables (tax, vapour pressure, tyre pressure), in engineering for characteristic curves and in spreadsheets for missing intermediate values.
Sources and legal basis
As of: · Editorial policy
Related tools
- Equation of a Line CalculatorEquation of a line from two points or from a point and slope: slope-intercept form, general form, parametric form, x-intercept and working shown at once.
- Slope calculatorSlope calculator: find the slope from rise and run, percent, angle or a 1 : n ratio – with conversion to percent and degrees, the working and a table of values.
- Proportion CalculatorSolve direct and inverse proportion problems (rule of three) online: find x from a ↔ b and c, with the unit value and step-by-step working.
- Ratio calculatorRatio calculator: simplify ratios, solve any missing value in a : b = c : d, split an amount in a ratio, scale, convert to fraction and percent – with steps.
- Distance Between Two Points CalculatorDistance between two points calculator for the plane and for space: enter the coordinates and read the length, the midpoint and the slope with the working.
- Online graphing calculatorGraphing calculator online: plot up to three functions, zoom and pan, find roots, extrema and intersections, use a slider for a, save as PNG or SVG. Free.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- GPA calculator for Australian universities (7-point scale)GPA calculator Australia: enter each course with its grade (HD, D, C, P or 1–7) and credit points to get your GPA on the 7-point or 4-point scale, with working.
- SGPA to CGPA CalculatorSGPA to CGPA calculator: enter each semester’s SGPA and credits and get your CGPA by the UGC formula, rounded to two decimals, with every step of the working.