Interpolation is the process of estimating a data point within an existing data set. We have some known X and Y values, but the X value we want to use is not in the list. How do we calculate its corresponding Y value?
Excel does not have a dedicated INTERPOLATE function, but it is still an excellent tool for the job. In fact, the FORECAST function, despite its name, is useful for estimating values between existing data points, not just beyond them.
The important part is choosing the right approach for the relationship in your data. We will work through simple mathematics, FORECAST and FORECAST.LINEAR, GROWTH, and a dynamic formula that interpolates between the two nearest data points.
You can download the example workbook to follow the calculations.
What You'll Learn
- FORECAST and FORECAST.LINEAR produce equivalent results for linear interpolation.
- Using the full data range estimates the overall linear relationship.
- Neighboring-point interpolation uses only the known points surrounding the required X value.
- INDEX and MATCH make the interpolation ranges adjust automatically when the input changes.
Which Excel interpolation method should we use?
There are three main scenarios to consider:
- A perfectly linear relationship: X and Y change at a constant rate. Simple mathematics or FORECAST will give us the result.
- A broadly linear relationship: The points follow a straight-line trend, but not perfectly. FORECAST uses all the supplied points to estimate a value on that trend.
- A nonlinear relationship: The data follows a curve. We can consider GROWTH for exponential relationships, or interpolate between the points immediately above and below the required X value.
These methods do not all answer quite the same question. Using the entire data set estimates the overall relationship. Using just the neighboring points estimates a value along the straight line connecting those two points.
Interpolate using simple mathematics
Let’s start with two known pairs of numbers:
- Cell A2 contains X = 10, and B2 contains Y = 65.
- Cell A3 contains X = 25, and B3 contains Y = 90.
- Cell E2 contains the X value to interpolate: 17.5.
We want to find the Y value corresponding to 17.5, assuming a straight-line relationship between the known points.
1. Calculate how much Y changes for each unit of X
Divide the change in Y by the change in X:
=(B3-B2)/(A3-A2)
This calculates 25 divided by 15, or approximately 1.6667. For every increase of 1 in X, Y increases by approximately 1.6667.
2. Calculate the distance from the starting X value
=E2-A2
The result is 7.5, because 17.5 is 7.5 units above 10.
Multiplying that distance by the rate of change tells us how much Y increases from its starting value:
=(E2-A2)*((B3-B2)/(A3-A2))
This returns 12.5. That is the change in Y, not the final Y value.
3. Add the starting Y value
The complete interpolation formula is:
=B2+(E2-A2)*((B3-B2)/(A3-A2))
The result is 77.5: our starting Y value of 65, plus an increase of 12.5.
The calculation is easier to understand when we break it into those three parts: find the rate of change, apply it to the distance in X, then add the starting Y value.
But there is a shorter way to write it in Excel.
Interpolate with FORECAST or FORECAST.LINEAR
FORECAST might sound like a function intended only for extrapolation, where we estimate beyond the known data. However, it also works for linear interpolation within the known range.
Its arguments are:
=FORECAST(x,known_ys,known_xs)
- x: The X value for which we want to estimate Y.
- known_ys: The existing Y values.
- known_xs: The corresponding existing X values.
For our two-point example, enter:
=FORECAST(E2,B2:B3,A2:A3)
Unsurprisingly, the result is 77.5, exactly the same as the mathematical approach.
What is the difference between FORECAST and FORECAST.LINEAR?
Excel 2016 introduced FORECAST.LINEAR as the replacement for FORECAST. The original FORECAST function remains available for backward compatibility with older versions, including Excel 2013 and earlier.
For these calculations, the functions are equivalent. We can write:
=FORECAST.LINEAR(E2,B2:B3,A2:A3)
And we get the same 77.5 result. Use FORECAST.LINEAR in newer workbooks, or FORECAST where compatibility with older versions is required.
Use the whole data set when the relationship is broadly linear
What if our data follows a linear trend but the individual points do not sit perfectly on a straight line?
This is where FORECAST becomes more useful than a calculation based only on the first and last points. It takes all the supplied data points into account when estimating the linear relationship.
In the next example, the known X values are in A2:A11, the known Y values are in B2:B11, and E2 still contains 17.5:
=FORECAST(E2,B2:B11,A2:A11)
The result is approximately 77.31. The FORECAST.LINEAR version returns the same result:
=FORECAST.LINEAR(E2,B2:B11,A2:A11)
For a data set with an underlying linear relationship, using all the points can give a more representative estimate than relying on the two endpoints alone.
However, using more points does not make a linear model suitable for every data set. If the relationship is curved, we need to reconsider the method.
What happens when the data is nonlinear?
In our nonlinear example, the chart begins relatively flat and then rises more quickly. A single straight line through the entire range does not follow that shape.
Using the first and last points with the mathematical approach gives 77.5 for X = 17.5. On the chart, that sits a long way above the plotted data.
Using all the points with FORECAST gives approximately 70.75:
=FORECAST(E2,B2:B11,A2:A11)
That is closer to the plotted line, but still not particularly close. FORECAST.LINEAR produces the same result because it uses the same linear calculation.
We have two further options: try an exponential model with GROWTH, or perform linear interpolation over a much smaller interval.
Try GROWTH for an exponential relationship
GROWTH is similar in purpose to FORECAST, but it estimates an exponential relationship rather than a linear one.
Be careful with the argument order. GROWTH starts with the known Y values, then the known X values, followed by the new X value:
=GROWTH(B2:B11,A2:A11,E2)
We do not need the optional final argument for this example.
The result is approximately 70.37. That is a little closer to the plotted line, but it still does not match the local shape closely enough.
GROWTH is an option when an exponential relationship is appropriate. It is not a general solution for every curve.
Interpolate between the nearest points
Instead of fitting a relationship across the entire data set, we can use the known point immediately below our required X value and the known point immediately above it.
This approach is sometimes called inner linear interpolation. We are still calculating a straight-line estimate, but only across the small interval containing the value we need.
For X = 17.5, the surrounding X values in our example are 16 and 18. These are in A6:A7, with their corresponding Y values in B6:B7.
We can therefore use:
=FORECAST(E2,B6:B7,A6:A7)
This returns approximately 67.58, placing the estimate directly on the straight segment connecting those neighboring points.
There is one obvious limitation: we selected those rows manually. If E2 changes to 13, the formula still uses the points at 16 and 18. It no longer selects the correct interval.
We need the ranges to adjust automatically.
Create dynamic interpolation with INDEX, MATCH, and FORECAST
We can make the neighboring-point method flexible by combining three functions:
- MATCH finds the position of the lower X value.
- INDEX creates references to the surrounding cells.
- FORECAST interpolates between those cells.
The following approach requires the X values in A2:A11 to be sorted in ascending order. The Y values in B2:B11 must remain paired with their corresponding X values.
We are using these functions for compatibility with older Excel versions. XLOOKUP is another option in newer versions, but we will keep this method based on INDEX and MATCH.
1. Find the position of the lower X value
Start with:
=MATCH(E2,A2:A11,1)
With ascending data, a match type of 1 finds the largest value less than or equal to the lookup value.
For 17.5, MATCH returns 5. This is the position within A2:A11, not the worksheet row number. The fifth value in that range is 16.
MATCH also has a match type of -1 for descending data, which finds the smallest value greater than or equal to the lookup value. However, the complete formula below is built for ascending data; a descending version needs its neighboring-point logic adjusted accordingly.
2. Return the lower X value with INDEX
Wrap MATCH inside INDEX:
=INDEX(A2:A11,MATCH(E2,A2:A11,1))
The result is 16, the closest known X value below 17.5.
3. Create a range containing both neighboring X values
INDEX has a useful extra ability: it can return a cell reference. We can put two INDEX expressions on either side of a colon, Excel’s range operator, to create a dynamic range.
=INDEX(A2:A11,MATCH(E2,A2:A11,1)):
INDEX(A2:A11,MATCH(E2,A2:A11,1)+1)
The first INDEX identifies the lower point. Adding 1 to the position in the second INDEX identifies the next point.
For 17.5, the resulting reference covers the cells containing 16 and 18.
4. Build the corresponding Y range and calculate the result
The Y range uses exactly the same positions, but INDEX returns references from column B. MATCH must continue looking in column A because we are locating the required X interval.
Put both dynamic ranges into FORECAST:
=FORECAST(
E2,
INDEX(B2:B11,MATCH(E2,A2:A11,1)):
INDEX(B2:B11,MATCH(E2,A2:A11,1)+1),
INDEX(A2:A11,MATCH(E2,A2:A11,1)):
INDEX(A2:A11,MATCH(E2,A2:A11,1)+1)
)
The formula looks long, but its structure is still simply:
=FORECAST(x,known_ys,known_xs)
We have replaced the fixed known Y and known X ranges with references that change according to E2.
For 17.5, the result is approximately 67.58, matching the manually selected method. Change E2 to 23, and the formula selects the new surrounding points and returns 82.
This construction needs both a lower point and a following point in the range, so use it for values with a valid surrounding interval.
Choose the method that matches your data
A simple interpolation question can lead to several different answers because each approach makes a different assumption about the relationship between X and Y.
- Use simple mathematics when you have two points and want a straight-line estimate between them.
- Use FORECAST or FORECAST.LINEAR across the full range when you want an estimate based on an overall linear relationship.
- Consider GROWTH when an exponential relationship suits the data.
- Use neighboring-point interpolation when you want to estimate along the segment between the closest known points.
Remember that neighboring-point interpolation is still linear. It does not discover the exact curve between observations, and the spacing of those observations can directly affect the accuracy of the estimate.
The most important step is understanding your data set. Once we know the relationship we are trying to represent, we can select the Excel formula that gives the most appropriate result.


