What is an example of interpolation

Linear interpolation in Excel: step-by-step example

When interpolating an unknown value of a function is estimated between two known values.

If two known values ​​(x 1 , y 1 ) and (x 2 , y 2 ) are given, we can estimate the y-value for a point x using the following formula:

y = y 1 + (x - x 1 ) (y 2 - y 1 ) / (x 2 - x 1 )

This tutorial is going to explain how to use linear interpolation to find an unknown y value based on an x ​​value in Excel.

Example: linear interpolation in Excel

Suppose we have the following record in Excel:

If we do a quick graph of the data, it looks like this:

Now suppose we want to find the y-value that corresponds to a new x-value of 13 is assigned. We can see that we have y values ​​for x values ​​of 12 and 14 measured but not for an x-value of 13.

We can use the following formula to do linear interpolation in Excel to find the estimated y value:

= FORECAST (NewX, AREA.MIFT (KnownY, MATCH (NewX, KnownX, 1) -1,0,2), AREA.MIFT (KnownX, MATCH (NewX, KnownX, 1) -1,0,2))

To use this function to estimate the y-values ​​associated with an x-value of 13:

The estimated y-value is 33,5.

If we add the point (13, 33.5) to our diagram, it seems to match the function pretty well:

We can use this formula to estimate the y value of any x value by adding we just that NewX Replace in the formula with a new x-value.

Note that the new x-value should fall within the range of the existing x-values ​​for this feature to work.