Calculator Tools
Linear Interpolation Calculator
Find y from x, x from y, map a value between two ranges, or run bilinear interpolation. Pure browser math with step-by-step results.
Linear interpolation calculator
Mode
Pick the calculation that matches your problem.
Result precision
Rounded display value for copying. Underlying math always uses full double precision.
Find y at a target x from two known points
Each field accepts decimals, signed numbers, and simple fractions like 3/4. European comma decimals are accepted too.
Point P1
Point P2
Interpolated y
5
Slope (m)
2
(y2 - y1) / (x2 - x1)
Intercept (b)
0
y = m x + b
Parameter (t)
0.75
0 = P1, 1 = P2
Step-by-step
- Step 1. Take the two known points P1 = (1, 2) and P2 = (3, 6).
- Step 2. The slope is m = (y2 - y1) / (x2 - x1) = (6 - 2) / (3 - 1) = 2.
- Step 3. Apply the interpolation formula y = y1 + (x - x1) * m = 2 + (2.5 - 1) * 2.
- Step 4. Result: y = 5.
Linear interpolation formulas
Quick reference for the formulas this calculator uses.
Find y at x
y = y1 + (x - x1) (y2 - y1) / (x2 - x1)
Find x at y
x = x1 + (y - y1) (x2 - x1) / (y2 - y1)
Lerp form
y = (1 - t) y1 + t y2, where t = (x - x1) / (x2 - x1)
Map range
out = outMin + (value - inMin) (outMax - outMin) / (inMax - inMin)
Bilinear
f(x, y) = (1 - tx)(1 - ty) Q11 + tx (1 - ty) Q21 + (1 - tx) ty Q12 + tx ty Q22
Slope
m = (y2 - y1) / (x2 - x1)
How to use
- Pick a mode at the top: Find y from x, Find x from y, Map range, or Bilinear.
- Enter the two known points (or the rectangle corners for bilinear). Fields accept decimals, signed numbers, and simple fractions like 3/4.
- Enter the target value (the x, y, or input value) and read the interpolated result with the slope, normalized parameter t, and a step-by-step derivation.
- Use Map range when you need to remap a sensor reading or a 0..1 number to a different scale, and toggle Clamp to keep the output inside the chosen bounds.
- Click any Copy button to grab the result on its own or the full report with formula, intermediate values, and steps for sharing or pasting into a doc.
About this tool
Linear Interpolation Calculator handles the four problems searchers actually mean when they look up linear interpolation. Find y from x reads a value from a straight line between two known points using y = y1 + (x - x1)(y2 - y1)/(x2 - x1). Find x from y is the inverse and is useful when you know the desired output of a linear sensor or a lookup table and want to back-solve the input. Map range remaps a value from an input range to an output range, which is the same lerp written in the Arduino map and Math.Lerp form, with an optional clamp to the output bounds for safe use in audio, animation, and graphics code. Bilinear interpolation works on a rectangle defined by (x1, y1) and (x2, y2) with corner values Q11, Q21, Q12, and Q22, returning the smooth value at any (x, y) using the standard f(x, y) = (1 - tx)(1 - ty) Q11 + tx (1 - ty) Q21 + (1 - tx) ty Q12 + tx ty Q22 formula that lookup tables, image sampling, climate grids, and finite element interpolation rely on. Every mode reports the slope, the normalized parameter t (or tx and ty), the intercept, and the underlying step-by-step derivation so the result is auditable. Inputs accept integers, decimals, European comma decimals, simple fractions like 3/4, and signed numbers, so engineering tables, scientific data, and code snippets paste in cleanly. When the target lies inside the known range the result panel labels the answer as interpolation, and when it falls outside the panel labels it extrapolation, so you never confuse one for the other. Result precision is configurable up to 12 decimals for copying into spreadsheets, code, or lab reports. Everything runs locally with IEEE 754 double precision in your browser, so the numbers you paste here are never uploaded.
Free to use. Works in your browser. No signup, no login.
Related tools
You may also like
Slope Calculator
Slope, line equation, midpoint, distance, and angle from two points.
Open tool
CalculatorWeighted Average Calculator
Weighted mean for any list of value and weight pairs, with a live breakdown.
Open tool
CalculatorPercentage Calculator
Four percentage calculators: percent of, what percent, change, and discount.
Open tool
CalculatorRatio Calculator
Simplify, solve, scale, and list equivalent ratios in one tool.
Open tool
CalculatorMean Median Mode Calculator
Mean, median, mode, range, standard deviation, and five number summary from any list.
Open tool
CalculatorQuadratic Equation Solver
Roots, discriminant, vertex, factored form, and step-by-step working for any quadratic.
Open tool