Linear Interpolation Calculator
Fill in five of the six values and leave one blank — the calculator solves it, whether that is the usual y, an inverse lookup for x, or a missing table entry. Also: paste a whole table and query it, or interpolate a two-way table (double / bilinear interpolation). Linear, log-x, log-y and log-log. Live plot. Built for engineering table lookups — steam tables, soil curves, friction factor charts.
Fill in five values and leave one box empty. The empty box is solved from the straight line through the other two points — so it works for an ordinary lookup (blank y), an inverse lookup (blank x), or backing out a missing table entry (blank x₁, y₁, x₂ or y₂).
Try an example:
Why linear interpolation matters in engineering
Engineering reference data is published in tables — steam tables, soil consolidation curves, Moody friction factor charts, AISC steel section properties, atmospheric standard tables. Real design conditions almost never land exactly on a tabulated value. You're forever interpolating between rows.
Linear interpolation is the simplest, most-used technique. For most engineering tables, the underlying physical relationship is smooth enough that linear interpolation between adjacent tabulated points is accurate to within ~1%. When the relationship is exponential or power-law, log interpolation does better.
When to use which method
- Linear: default. Most appropriate for relationships that are nearly linear over the interval being interpolated. Manning's roughness vs. surface condition, thermal conductivity vs. temperature, beam deflection vs. load.
- Log-x, linear-y: when the independent variable spans orders of magnitude (Reynolds number, frequency, time) and the dependent variable changes slowly with x. Common for friction factor vs. Reynolds for a fixed roughness.
- Linear-x, log-y: when the dependent variable changes exponentially. Vapor pressure vs. temperature (over modest ranges), radioactive decay, settlement vs. time in primary consolidation.
- Log-log: when both variables span orders of magnitude and the relationship is power-law. Sediment transport rate vs. shear stress, scaling laws in biology, frequency response of mechanical systems.
The accuracy question
Linear interpolation introduces error proportional to the second derivative of the underlying function and the square of the interval width. For a smooth, monotonic curve where consecutive table entries differ by a few percent, the error is typically much less than the precision of the tabulated values themselves. For sharply curved relationships (e.g., vapor pressure of water over wide temperature ranges) or when the function has an inflection nearby, switch to log interpolation or use a tighter table.
Solving for any of the six values
Two points fix a straight line, and a third point on that line has one coordinate free once the other is given. That is all a linear interpolation is, so there is no reason to restrict the unknown to y. The Any blank mode takes whichever box you leave empty and solves it from the line through the other two points. Leave y blank for a normal lookup, leave x blank for an inverse lookup, or leave a table value blank to back out an entry that was smudged, mis-copied, or never published — for example the starting elevation of a constant-grade line from two stations further along it.
Double (bilinear) interpolation
Many engineering tables depend on two inputs: superheated-steam properties by pressure and temperature, bearing-capacity or chart factors by two ratios, wind or snow coefficients by height and exposure. When neither input lands on a tabulated row or column, interpolate twice: along x on the two bracketing rows, then along y between those results. The order does not matter — bilinear interpolation gives the same value either way — and the error behaves like one-dimensional linear interpolation in each direction, so a coarse table in either direction needs the same care.
Inverse interpolation
The inverse mode solves "given y, find x" — useful when looking up the temperature corresponding to a measured saturation pressure, or the Reynolds number that produces a specific friction factor. The math is the same equation rearranged. Watch for non-monotonic functions: if y is not monotonic over the interval, inverse interpolation can give multiple valid answers; this calculator returns the one that falls within the bracketing x range.
Reference: Press, W.H. et al. (2007). Numerical Recipes: The Art of Scientific Computing (3rd ed.), Chapter 3. For engineering table interpolation conventions, see Crane Technical Paper 410 and ASTM E380 for SI-conversion practices.
Reference: which interpolation to use
| Data / table | Mode | Why |
|---|---|---|
| Steam tables, psychrometrics, most textbook tables | Linear | Tabulated at intervals fine enough that curvature is negligible |
| Rating curves (stage vs discharge) | Log-log | Q ∝ (h − h0)b is a power law — linear on log-log axes |
| IDF rainfall (intensity vs duration) | Log-log | Near power-law across durations spanning decades |
| Pump H-Q curves | Linear | Smooth and gently curved over the operating range |
| Grain-size distributions (% passing vs size) | Log-x | Sieve sizes are geometric; D50 is read on a log axis |
| Soil consolidation (e vs log σ′) | Log-x | The compression index Cc is defined on a semi-log plot |
| Decay / die-off processes vs time | Log-y | First-order decay is linear on a semi-log plot |
| Moody diagram (f vs Re) | Log-log | Both axes span several decades |
Picking the wrong mode is a real source of error when the table is coarse. Interpolating a power law linearly always cuts the chord beneath the curve, under-predicting mid-interval values — the error grows with interval width.
Related tools
- Darcy-Weisbach pipe head loss (uses friction factor — interpolate from a Moody-style table)
- Manning's open-channel flow
- Reynolds number flow regime