Home › Calculators › Linear Interpolation Calculator

Linear Interpolation Calculator

Estimate a value between two known points by assuming a straight line between them. Enter two points or paste a whole table of x, y values, then get the interpolated (or extrapolated) result with the formula worked out and a plot of the data.

Last updated:

Data
Find

Separate x and y with a comma, space or tab. You can paste two columns from a spreadsheet. Rows are sorted by x automatically.

Enter your values to see the result.
Advertisement
Advertisement

How to use the Linear Interpolation Calculator

  1. Choose your data: two points, or a data table with one x, y pair per line.
  2. Choose what to find: y for a given x, or x for a given y.
  3. Enter the known points (x₁, y₁) and (x₂, y₂), or paste the table.
  4. Enter the x (or y) value you want to look up.
  5. Read the result, check the working and the plot, and copy the results if needed.

How linear interpolation works

Linear interpolation assumes the values change at a constant rate between two known points. The fraction of the way your x lies between x₁ and x₂ is t = (x − x₁) ÷ (x₂ − x₁), and the answer is the same fraction of the way from y₁ to y₂: y = y₁ + t × (y₂ − y₁). When t is between 0 and 1 you are interpolating; below 0 or above 1 you are extrapolating.

SituationKnown pointsLook upResult
Water density table (g/cm³)(20 °C, 0.998), (30 °C, 0.996)25 °C0.997
Celsius to Fahrenheit table(20, 68), (30, 86)2780.6 (exact, the relationship is linear)
Sensor calibration(100 units, 4.2 mA), (200 units, 7.8 mA)150 units6.0 mA
Trend extrapolation(2020, 150), (2024, 190)2027220 (extrapolated)
Inverse lookup(2, 10), (6, 30)y = 22x = 4.4

Tips for accurate results

  • Always use the two table rows that bracket your value most tightly; skipping rows adds error when the data is curved.
  • Keep units consistent: interpolate in the same units the table uses, then convert the answer.
  • For data that grows exponentially (populations, compound interest, decibels), interpolating the logarithm of y is often more accurate than interpolating y itself.
  • Treat extrapolated values as rough estimates. The further outside the data, the less reliable the straight-line assumption.
  • If many points roughly follow a line but do not sit exactly on it, a best-fit line from linear regression is a better model than connecting the dots.

Frequently asked questions

What is the linear interpolation formula?

y = y₁ + (x − x₁) × (y₂ − y₁) ÷ (x₂ − x₁). It draws a straight line through (x₁, y₁) and (x₂, y₂) and reads off the y value at your x. For example, between (20, 0.998) and (30, 0.996), the value at x = 25 is 0.998 + 5 × (−0.002) ÷ 10 = 0.997.

What is the difference between interpolation and extrapolation?

Interpolation estimates a value inside the range of your known data (between x₁ and x₂). Extrapolation extends the line beyond that range. The formula is the same, but extrapolation is less reliable because the trend may not continue.

How do I interpolate from a table?

Find the two rows whose x values surround your x, then apply the formula to those two rows only. This calculator does that automatically: paste the table, enter x, and it picks the bracketing rows (highlighted in the table and plot).

Can I find x when I know y?

Yes. Choose 'x for a given y' to use the inverse formula x = x₁ + (y − y₁) × (x₂ − x₁) ÷ (y₂ − y₁). If the table goes up and down, the same y may occur more than once; the calculator lists the other matching x values.

How accurate is linear interpolation?

It is exact when the relationship really is a straight line, and a good approximation when the points are close together. For strongly curved data, such as exponential growth, the error grows with the distance between the two points, so use rows that are as close to your x as possible.

What is double interpolation?

When a table depends on two variables (for example temperature and pressure in a steam table), you interpolate in one direction to get two intermediate values, then interpolate between those. You can do this by running this calculator three times.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Linear Regression CalculatorLeast-squares line of best fit: slope, intercept, r, r², predictions and a scatter plot.Slope CalculatorSlope, angle, line equation y = mx + b and distance from two points, with a graph.Point Slope Form CalculatorLine equation in point-slope form from a point and slope or two points, plus y = mx + b.Percent Error CalculatorPercent error between experimental and theoretical values, for one result or several trials.Riemann Sum CalculatorLeft, right, midpoint and trapezoid sums of f(x) on [a, b] with a table and rectangle graph.Tangent Line CalculatorFind the tangent and normal line to f(x) at a point, with the derivative, slope and a graph.Graphing CalculatorPlot multiple functions with zoom, pan, intersections and a value table.Exponent CalculatorRaise any number to a power, including negative and fractional exponents.Logarithm CalculatorCalculate log in any base, ln, log10, log2 and antilog with change-of-base steps.Quadratic Equation SolverSolve ax² + bx + c = 0 with exact roots, steps, vertex and a parabola graph.Matrix CalculatorAdd, multiply, invert and row-reduce matrices up to 5×5 with exact fractions and steps.Prime Number CheckerCheck if a number is prime, factor it with a factor tree and list primes in a range.GCF and LCM CalculatorFind the GCF and LCM of two or more numbers with Euclid steps and prime factorization.Cubic Yard CalculatorConvert length, width and depth in any unit to cubic yards, cubic feet, m³ and material weight.Factorial CalculatorExact n! up to 5000! with digit count, trailing zeros and double factorial.Prime Factorization CalculatorFind prime factors in exponent form with a factor tree, divisor count and divisors list.Modulo CalculatorCalculate a mod n and the quotient, with floored, truncated and Euclidean rules.Exponential Growth CalculatorExponential growth and decay: final amount, rate or time, discrete or continuous.System of Equations SolverSolve 2×2, 3×3 and 4×4 linear systems with exact fractions and step-by-step working.Cubic Equation SolverSolve ax³ + bx² + cx + d = 0 for real and complex roots with steps and a graph.Summation CalculatorEvaluate sigma notation: sum any expression in n from a to b with partial sums and a chart.Arithmetic Sequence CalculatorFind the n-th term, sum and full list of an arithmetic sequence, or d from two terms.Geometric Sequence CalculatorFind the n-th term, sum and infinite sum of a geometric sequence, or r from two terms.Fibonacci CalculatorExact n-th Fibonacci number (BigInt), sequence lists, Fibonacci check and golden ratio.Factors CalculatorAll factors and factor pairs of a number, prime factors, divisor count and perfect check.Depth of Field CalculatorNear and far focus limits, depth of field and hyperfocal distance for any camera or lens.Crop Factor CalculatorCrop factor, full-frame equivalent focal length and aperture, and field of view for any sensor.Completing the Square CalculatorRewrite ax² + bx + c in vertex form a(x − h)² + k step by step and solve it.Derivative CalculatorSymbolic derivative of any f(x) up to 5th order, with steps, slope at a point and a graph.Exposure Value CalculatorEV from aperture, shutter and ISO, or solve any missing setting with sunny 16 presets.Factoring Trinomials CalculatorFactor trinomials and polynomials: GCF, ac method, difference of squares, cubes, with steps.Integral CalculatorDefinite integral of f(x) from a to b with adaptive Simpson, area graph and antiderivative.Least Common Denominator CalculatorFind the LCD of two or more fractions and rewrite them as equivalent fractions, with steps.Limiting Reactant CalculatorFind the limiting reactant, theoretical yield and leftover excess from an equation.Parabola CalculatorVertex, focus, directrix, axis, intercepts and graph of a parabola from its equation.Polynomial Root FinderFind all real and complex roots of a polynomial up to degree 10, with the factored form.Prime Number List GeneratorList all primes in a range or the first N primes with a fast sieve; copy or download the list.Quadratic Regression CalculatorFit y = ax² + bx + c (or up to degree 6) to x, y data with R², predictions and a graph.Table of Values CalculatorMake an x/y table for any function with a start, end and step, then plot it or copy CSV.Scatter Plot MakerPaste X,Y pairs for a scatter plot with trendline, equation, r and R². Download PNG.Synthetic Division CalculatorDivide polynomials by x − c (synthetic table) or any polynomial (long division) with steps.3D Graphing CalculatorPlot z = f(x, y) surfaces and 3D parametric curves; rotate, zoom, add contours, save PNG.Algebra CalculatorSimplify, expand and factor algebraic expressions with exact answers and step-by-step working.Determinant CalculatorDeterminant of a 2×2 to 8×8 matrix with exact fractions and cofactor or row-reduction steps.Differential Equation SolverSolve first- and second-order ODEs step by step, with initial conditions, an RK4 check and a graph.Domain and Range CalculatorFind the domain and range of a function in interval notation, with steps and a graph.Eigenvalue and Eigenvector CalculatorEigenvalues (real or complex), eigenvectors and the characteristic polynomial of a square matrix.Equation SolverSolve any equation for x: exact roots, complex roots, numeric answers, steps and a graph.Inequality CalculatorSolve linear, quadratic, rational and absolute value inequalities with steps and a number line.Inverse Function CalculatorFind the inverse f⁻¹(x) of a function with steps, domain restrictions and a graph.Laplace Transform CalculatorLaplace transform of f(t) with the table rule used for each term and the region of convergence.Limit CalculatorEvaluate limits at a point or at infinity, one-sided or two-sided, with steps, table and graph.Matrix Inverse CalculatorFind the inverse of a 2×2 to 8×8 matrix in exact fractions with Gauss–Jordan or adjugate steps.Partial Derivative CalculatorPartial derivatives ∂/∂x, ∂/∂y, second and mixed orders with steps, gradient and Hessian.RREF CalculatorRow reduce any matrix to RREF with exact fractions, every row operation, pivots and rank.Stem and Leaf Plot MakerMake stem-and-leaf plots (standard, split stems or back-to-back) with a key; copy or save PNG.Taylor Series CalculatorTaylor and Maclaurin polynomials of any f(x) to order n, with exact coefficients and a graph.Antilog CalculatorInverse logarithm (antilog) in base 10, e, 2 or any base, with steps and scientific notation.Asymptote CalculatorFind vertical, horizontal and slant asymptotes and holes of a function, with graph and reasoning.Cramer's Rule CalculatorSolve 2x2 and 3x3 linear systems by Cramer's rule with every determinant shown step by step.Dot Plot MakerMake a dot plot or line plot from data or a frequency table; download PNG or SVG.Exponential Regression CalculatorFit y = a·bˣ or y = a·e^(kx) to data with r², predictions, residuals and a plot.Extended Euclidean Algorithm CalculatorFind gcd(a, b) and Bézout coefficients x, y with the full step-by-step division table.Factor Tree GeneratorDraw the prime factor tree of any number as a printable diagram, with exponent form and steps.Function Composition CalculatorFind f(g(x)), g(f(x)), f + g, f · g and f / g with values at a point and domains.X and Y Intercept CalculatorFind the x- and y-intercepts of lines, curves and functions with steps and a graph.Line Intersection CalculatorFind where two lines cross from equations, points or slopes, with parallel checks and a graph.Linear Programming SolverSolve max/min linear programs with the simplex method: tableau steps and a 2-variable graph.
See all 74 Algebra & Calculus Calculators →