# Linear Interpolation Formula, Definition, Examples & More

**Linear Interpolation Formula **is the process of finding a value between two points on a line or curve. To help us remember what it means, we should think of the first part of the word, ‘inter,’ as meaning ‘enter,’ which reminds us to look ‘inside’ the data we originally had. This tool, interpolation, is not only useful in statistics but is also useful in science, business or any time there is a need to predict values that fall within two existing data points.

The method of finding new values for any function using the set of values is done by interpolation. The unknown value on a point is found out using this formula. If linear interpolation formula is concerned then it should be used to find the new value from the two given points. If compared to Lagrange’s interpolation formula, the “n” set of numbers should be available and Lagrange’s method is to be used to find the new value.

**Interpolation Formula/Linear Interpolation Formula**

Interpolation is a method for estimating the value of a function between two known values. Often some relationship is measured experimentally or traced with Dagra at a range of values. Interpolation can be used to estimate the function for untabulated points.

For example, suppose we have tabulated data for the thermal resistance of a transistor tabulated for air velocity from 0 to 1800 FPM in 200 FPM steps. Interpolation can be used to estimate the thermal resistance at non-tabulated values such as 485 FPM.

The following is **Linear Interpolation Formula**

**Example: **Using the interpolation formula, find the value of y at x = 8 given some set of values (2, 6), (5, 9)?

**Solution: **The known values are,x0=8,x1=2,x2=5,y1=6,y2=9

y=y1+(x−x1)/(x2−x1)×(y2−y1)

y=6+((8−2)(5−2)×(9−6)

**Interpolation Formula Excel**

Interpolation estimates data points within an existing data set. As a simple example, if it took 15 minutes to walk 1 mile on Monday and 1 hour to walk 4 miles on Tuesday, we could reasonably estimate it would take 30 minutes to walk 2 miles. This is not to be confused with extrapolation, which estimates values outside of the data set. To estimate that it would take 2 hours to walk 8 miles would be extrapolation as the estimate is outside of the known values.

The following Microsoft Excel formula performs linear interpolation by calculating the interpolation step value:

**=(end-start)/(ROW(end)-ROW(start))**

Excel is a great tool for this type of analysis, as ultimately it is just a big visual calculator.

In terms of answering my reader’s question, there are a number of scenarios that would lead to different solutions. At first, I thought I could just use simple mathematics. This would work if the results were perfectly linear (i.e., the values move perfectly perfect sync with each other). But what if they are not perfectly correlated?

I then thought about Excel’s FORECAST function. Based on its name, the FORECAST function seems like an odd choice. It would appear to be a function specifically for extrapolation, however, it is one of the best options for linear interpolation in Excel. FORECAST uses all the values in the dataset to estimate the result, therefore is excellent for linear relationships, even if they are not perfectly correlated.

Then another thought, what if the X and Y relationship is not linear at all? How could we interpolate a value when the data is exponential?

**Interpolation using simple mathematics**

Using simple mathematics works well when there are just two pairs of numbers or where the relationship between X & Y is perfectly linear. Here is a basic example

**=B2+(E2-A2)*(B3-B2)/(A3-A2)**

That might look a bit complicated to some, so I’ll just give a quick overview of this formula.

**=B2+(E2-A2)*(B3-B2)/(A3-A2)**

The last section (highlighted in red above) calculates how much the Y value moves whenever the X value moves by 1. In our example, Y moves by 1.67 for every 1 of X.

**=B2+(E2-A2)*(B3-B2)/(A3-A2)**

The second section (in red above) calculates how far our interpolated X is away from the first X, then multiplies it by the value calculated above. Based on our example, it is 17.5 (Cell E2) minus 10 (Cell A2), the result of which is then multiplied by 1.67 (which equals 12.5).

**=B2+(E2-A2)*(B3-B2)/(A3-A2)**

Finally, the first section of the formula (in red above); we add the first Y value. In our example, this provides the final result of 77.5 (65 + 12.5).

**Lagrange Interpolation Formula**

This is again an N^{th} degree polynomial approximation formula to the function f(x), which is known at discrete points x_{i}, i = 0, 1, 2 . . . N^{th}. The formula can be derived from the Vandermonds determinant but a much simpler way of deriving this is from Newton’s divided difference formula. If f(x) is approximated with an N^{th} degree polynomial then the N^{th} divided difference of f(x) constant and (N+1)^{th} divided difference is zero. That is

**f [x _{0}, x_{1}, . . . x_{n}, x] = 0**

From the second property of divided difference we can write

Since Lagrange’s interpolation is also an **N**^{th} degree polynomial approximation to **f(x)** and the **N**^{th} degree polynomial passing through **(N+1) **points is unique hence the Lagrange’s and Newton’s divided difference approximations are one and the same. However, Lagrange’s formula is more convenient to use in computer programming and Newton’s divided difference formula is more suited for hand calculations.