We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Quickly calculate the linear interpolation result of an intermediate point based on two known coordinates.
If the target x is between the two known points, it's interpolation. If it's outside this range, it's extrapolation (results may have larger errors).
Linear Interpolation Formula
y = y₁ + (x − x₁) · (y₂ − y₁) / (x₂ − x₁)
Alternative Form: y = y₁ + t · (y₂ − y₁)
Ratio: t = (x − x₁) / (x₂ − x₁)
Linear interpolation assumes a linear relationship between two points, best suited for data with gradual changes or within small intervals.
y = y₁ + (x − x₁) · (y₂ − y₁) / (x₂ − x₁)y = 10 + (3 − 1) · (30 − 10) / (5 − 1)y = 20y = 10 + 5 · (x - 1)Overview
Understand what the tool solves, how it works, and the boundaries of its data.
Enter two coordinate pairs, (x₁, y₁) and (x₂, y₂), plus a target x. The calculator applies the straight-line relationship
y = y₁ + (x − x₁) × (y₂ − y₁) / (x₂ − x₁)
Equivalently, t = (x − x₁) / (x₂ − x₁), then y = y₁ + t × (y₂ − y₁).
For a target x between the two input x-values, the result is linear interpolation: it assumes the value changes along the straight segment joining the points. A target outside that interval uses the same line to extrapolate. Cornell’s introductory computing lecture describes the same two-point calculation and distinguishes a target within the interval.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Fill in x₁ and y₁ using the same x- and y-units you will use for the second point and target.
Fill in x₂, y₂, and the x-coordinate whose y-value you want. Inputs accept numeric values, including decimals and negatives.
The result includes y, the slope, the relative position ratio t, Δx, Δy, a substituted formula, and the line equation. The status indicates interpolation, extrapolation, or that the target matches an endpoint.
Use the copy control for the result, or reset the inputs to the example values (1, 10), (5, 30), and x = 3.
Use cases
See how the tool fits into real work and everyday tasks.
With points (1, 10) and (5, 30), and target x = 3, the ratio is 0.5, the slope is 5, and the estimated y is 20. This makes a compact way to verify the formula by hand.
If two observations bracket the x-value you need, enter their coordinates and estimate the missing y under a straight-line assumption. Keep units consistent across both axes.
A target beyond the known x-values is labeled extrapolation. The displayed number extends the line mathematically, but it is not evidence that a real-world trend continues unchanged.
Q&A
Find concise answers to common questions and confusing cases.
It places the target between the x-coordinates: t = 0 is the first point, t = 1 is the second, and values between them lie along the segment. A ratio outside that range indicates extrapolation.
The formula divides by x₂ − x₁. If the x-values are equal, that denominator is zero, so this calculator cannot return one y-value for the requested target x.
The calculator displays rounded values (up to six decimal places for ordinary magnitudes, with scientific notation for very small or large values). The copied numeric result may show additional precision.
Notes
Review scope, result limitations, and important precautions before use.
Linear interpolation estimates a point on a straight line; it does not fit a curve or choose among several data points. The usefulness of the estimate depends on whether a straight-line approximation is appropriate for the quantity and interval. Extrapolation goes beyond the supplied points and can be especially unreliable when the underlying relationship changes. Enter x-values in matching units and y-values in matching units; the calculator has no unit selector or automatic unit conversion.
Related
Discover related tools, collections, and available API capabilities.