Linear Interpolation Calculator

Updated July 2026

Enter two known points (x₁, y₁) and (x₂, y₂), then a target — fill in a target x to find y, or a target y to solve for x. The calculator shows the interpolated value, the interpolation fraction, and flags when your target falls outside the known range (extrapolation). Everything runs privately in your browser.

Linear interpolation estimates a value on a straight line between two points: y = y₁ + (x − x₁)·(y₂ − y₁) / (x₂ − x₁). The fraction (x − x₁)/(x₂ − x₁) is how far x sits between x₁ and x₂. For the points (10, 100) and (20, 200), x = 15 gives y = 150.
Fill in target x to find y, or target y to solve for x. Leave the other blank.
Interpolated value
Solving for
Interpolation fraction
In range / extrapolation
Slope (Δy / Δx)
Δx (x₂ − x₁)
Δy (y₂ − y₁)
Formula used
Computed point

How this linear interpolation calculator works

Linear interpolation estimates an unknown value between two known data points by assuming the relationship between them is a straight line. Given two points (x₁, y₁) and (x₂, y₂), the value at any target x is y = y₁ + (x − x₁)·(y₂ − y₁) / (x₂ − x₁). The term (x − x₁)/(x₂ − x₁) is the interpolation fraction: it equals 0 at the first point, 1 at the second point, and slides smoothly in between.

This calculator works both ways. Enter a target x and it finds the matching y. Enter a target y instead and it performs inverse interpolation, rearranging to x = x₁ + (y − y₁)·(x₂ − x₁) / (y₂ − y₁). If your target lies outside the interval between the two known points, the result is an extrapolation — still computed with the same line, but flagged because the trend may not hold beyond your data.

Worked example: for the points (10, 100) and (20, 200) with target x = 15, the fraction is (15 − 10) / (20 − 10) = 0.5, so y = 100 + 0.5·(200 − 100) = 150. Because 15 lies between 10 and 20, this is interpolation rather than extrapolation.

Reference note: when x₁ = x₂ the slope is undefined (a vertical line) and y cannot be interpolated; when y₁ = y₂ the line is flat and you cannot solve for a single x from a target y. Extrapolation reuses the same formula but is less reliable the further the target sits beyond the known range.

Interpolation fraction reference

Target positionFraction (x − x₁)/(x₂ − x₁)Interpretation
At x₁0Returns y₁ exactly
Midway between0.5Average of y₁ and y₂
At x₂1Returns y₂ exactly
Before x₁ or after x₂< 0 or > 1Extrapolation (flagged)

Frequently asked questions

What is linear interpolation?
Linear interpolation estimates an unknown value between two known data points by assuming the change between them follows a straight line. You read off the value at the position you care about, giving an estimate that lies proportionally between the two known values.
What is the linear interpolation formula?
The formula is y = y₁ + (x − x₁)·(y₂ − y₁)/(x₂ − x₁), where (x₁, y₁) and (x₂, y₂) are the known points and x is the target. The fraction (x − x₁)/(x₂ − x₁) measures how far x sits between x₁ and x₂, from 0 to 1.
What is the difference between interpolation and extrapolation?
Interpolation estimates a value inside the range of your known points, when the target lies between x₁ and x₂. Extrapolation estimates a value outside that range. Both use the same straight-line formula, but extrapolation is less reliable because it assumes the trend continues beyond your data.
How do I interpolate between two values?
Find the fraction of the way your target x is between the points: (x − x₁)/(x₂ − x₁). Multiply it by the change in y (y₂ − y₁) and add to y₁. For (10, 100) and (20, 200) at x = 15, the fraction is 0.5, so y = 100 + 0.5·100 = 150.
When is linear interpolation accurate?
It is accurate when the underlying relationship is close to a straight line over the interval and the two known points are reasonably close together. It is less accurate for curved data, wide gaps, or when extrapolating beyond the known points.
Can I solve for x instead of y?
Yes. To find the x for a target y, rearrange to x = x₁ + (y − y₁)·(x₂ − x₁)/(y₂ − y₁). This inverse interpolation needs y₁ and y₂ to differ; if y₁ = y₂ the line is flat and no single x matches. This calculator solves whichever target you fill in.
⚡ Linear Interpolation Calculator — by larely ↗

Related tools

Wavelength Calculator

Convert between wavelength, frequency and wave speed .

Force Calculator

Solve Newton's second law F = ma for force, mass or acceleration.

Kinetic Energy Calculator

Solve KE = ½mv² for kinetic energy, mass or velocity.

Rounding Calculator

Round a number to decimals, a nearest multiple, or by mode .

Arithmetic Sequence Calculator

Find the nth term and sum of an arithmetic sequence from a1 and the common difference.

Geometric Sequence Calculator

Find the nth term, sum and infinite sum of a geometric sequence.

Pythagorean Theorem Calculator

Solve a² + b² = c² for any missing side of a right triangle, plus angles and area.

Distance Formula Calculator

Find the distance between two points, plus the midpoint and slope.

Final Grade Calculator

Find the grade you need on the final, plus weighted-grade and GPA calculators.

Percentage Calculator

Percent of a number, percent change, and percentage increase or decrease.

Statistics Calculator

Mean, median, mode, range and standard deviation from a list of numbers.

Fraction Calculator

Add, subtract, multiply and divide fractions, with simplification.

Browse all 251 free tools →