Omni Calculator logo

Linear Interpolation Calculator

Created by Bogna Szyk
Reviewed by Steven Wooding and Jack Bowater
Last updated: Jun 05, 2023


This linear interpolation calculator is a handy tool for finding points on a certain line — determined either by two coordinates or directly by the slope-intercept form. This article will provide you with the linear interpolation equation and explain in detail how to use it. Thanks to this calculator, you will be able to find the linear interpolation (or extrapolation) in no time!

What is the linear interpolation?

Imagine that you are trying to measure the dependence between the amount of flour you use to bake cookies and the number of cookies that you get. The first time you used 200 g of flour and got 15 cookies, and the second time, while using 300 g — 20 cookies. You want to know how many cookies you get if using 250 g of flour. If you assume that the relationship is linear, what you are looking for is the linear interpolation. If you were looking for a value that is beyond the tested range (for example, 500 g of flour), it would be called extrapolation.

Linear interpolation formula

If you want to solve for y, the linear interpolation equation is as follows:

y = (x - x₁) × (y₂ - y₁) / (x₂ - x₁) + y₁

where:

  • (x₁, y₁) — Coordinates of the first known data point;
  • (x₂, y₂) — Coordinates of the first known data point; and
  • (x, y) — Coordinates of the point you are looking for.

The formula for extrapolation is identical. You need to remember, though, that extrapolation often gives results that are not confirmed by experimental data, so, unless you are certain that the relationship is linear, it's always better to use interpolation instead.

💡 You might also be interested in our slope intercept form calculator.

How to use this calculator to solve for y

Let's solve the cookie problem together. How many cookies can you bake with 250 g of flour?

  1. Determine the coordinates of the first data point. In our case, x₁ = 200 and y₁ = 15.

  2. Determine the coordinates of the second data point. In our case, x₁ = 300 and y₁ = 20.

  3. Choose the x-value for the point you are analyzing. In this case, x = 250.

  4. Input all these values into the linear interpolation formula:

    y = (x - x₁) × (y₂ - y₁) / (x₂ - x₁) + y₁

    y = (250 - 200) × (20 - 15) / (300 - 200) + 15

    y = 17.5

  5. The linear interpolation calculator will provide you with the slope and intercept of the linear equation determined by the two points. In this case, m = 0.05 and b = 5.

  6. You can also use this linear interpolation calculator for extrapolation — for example, you can calculate what amount of flour is required to bake 50 cookies.

Check how many cookies can you bake with no flour at all if you assume a linear relationship. What conclusions about extrapolation can you infer from this check?

We also have a dedicated calculator for computing slopes. Check out our slope calculator.

And if you want to expand into two dimensions, check out our bilinear interpolation calculator.

Bogna Szyk
Coordinates
x₁
y₁
x₂
y₂
x₃
y₃
Slope intercept form: y = mx + b
m
b
Check out 46 similar coordinate geometry calculators 📈
Average rate of changeBilinear interpolationCatenary curve… 43 more
People also viewed…

Power modulo

Master modular arithmetic with our power mod calculator, perfect for calculations with exponents. Simplify complex math effortlessly. Try now!

Significant figures

The significant figures calculator performs operations on sig figs and shows you a step-by-step solution!

Slope intercept form

The slope intercept form calculator will help you find the equation of a line if you know two points it goes through.

Sunbathing

Do you always remember to put on sunscreen before going outside? Are you sure that you use enough? The Sunbathing Calculator ☀ will tell you when's the time to go back under an umbrella not to suffer from a sunburn!
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service