How to Interpolate Between Two Values in Excel (6 Ways)

In the dataset, we have some X Coordinates and Y Coordinates. We’ll interpolate the value for given coordinates.

how to interpolate between two values in excel


Method 1 – Using the FORECAST or FORECAST.LINEAR Function to Interpolate Between Two Values in Excel

Steps:

  • Make new rows for the value you want to interpolate. We want to interpolate between 8 and 9, so we chose a value of 8.5 and put it in C14.

  • Use the following formula in cell C15.
=FORECAST(C14,C5:C12,B5:B12)

how to interpolate between two values in excel

The FORECAST function determines the interpolated value in cell C15 via linear regression. It works on the ranges B5:B12 (as known_Xs) and C5:C12 (as known_Ys).

  • Hit the Enter button.

  • You can also use the following function:
=FORECAST.LINEAR(C14,C5:C12,B5:B12)

how to interpolate between two values in excel

  • Hit Enter.

The FORECAST function is getting deprecated by FORECAST.LINEAR, so it might not be available for newer Excel versions.


Method 2 – Combining Excel XLOOKUP and FORECAST Functions to Interpolate Between Two Values

Suppose we want to interpolate for the x-value 6 in B9:C10.

Steps:

  • Modify the dataset to place the coordinates.

how to interpolate between two values in excel

  • Use the following formula in cell F7.
=XLOOKUP(C14, B5:B12,B5:B12,,-1,1)

The XLOOKUP function looks up the value in C14, searches for this value in the range B5:B12, and returns the value which is adjacently smaller than 6.5 as it cannot find this exact value in that range and we put -1 in this regard. We get x1 as 5.

When we need a value adjacently larger than 6.5, we use ‘1’ instead of ‘-1’ in the formula.

  • Hit Enter to see the result in cell F7.

how to interpolate between two values in excel

  • Use the following formula in cell F8.
=XLOOKUP(C14, B5:B12,B5:B12,,1,1)

  • Hit the Enter key and you will see a value above 6 in cell F8.

how to interpolate between two values in excel

  • Use the following formula in cell F9.
=XLOOKUP(C14, B5:B12,C5:C12,,-1,1)

  • Hit Enter.

how to interpolate between two values in excel

  • Use this formula in cell F10.
=XLOOKUP(C14, B5:B12,C5:C12,,1,1)

  • Hit Enter and you will see the Y Coordinate that corresponds to X2.

how to interpolate between two values in excel

  • Select cell C15 and use the formula given below.
=FORECAST(C14,F9:F10,F7:F8)

  • Press the Enter key to see the interpolated value in cell C15.

how to interpolate between two values in excel

Note that the value is different since the FORECAST here has only two values to use as the baseline.


Method 3 – Inserting INDEX-MATCH with the FORECAST Function to Interpolate Between two Values

We want to interpolate the x-value 6 in B9:C10.

Steps:

  • Modify the dataset to place the coordinates.

  • Use the following formula in cell F7.
=INDEX(B5:B12,MATCH(C14,B5:B12,1))

how to interpolate between two values in excel

The MATCH function returns the position of the cell value of C14 in the range B5:B12. And then the INDEX function returns the value of that position in B5:B12. Thus, it returned x1. 

A similar formula is used to determine x2, y1, and y2.

  • Hit Enter to see the result in cell F7.

  • Use the following formula in cell F8.
=INDEX(B5:B12,MATCH(C14,B5:B12,1)+1)

how to interpolate between two values in excel

  • Hit the Enter key, and you will see the next value above 6 in cell F8.

  • Use the following formula in cell F9.
=INDEX(C5:C12,MATCH(C14,B5:B12,1))

how to interpolate between two values in excel

  • Hit Enter. This returns the Y1 value that corresponds to X1.

  • Use the following formula in cell F10.
=INDEX(C5:C12,MATCH(C14,B5:B12,1)+1)

how to interpolate between two values in excel

  • Hit Enter.

  • Select cell C15 and insert the formula given below.
=FORECAST(C14,F9:F10,F7:F8)

how to interpolate between two values in excel

  • Press the Enter key to see the interpolated value in cell C15.


Method 4 – Interpolating Between Two Values by Applying a Mathematical Formula 

The interpolation formula is given below. It uses an equation of a straight line.

how to interpolate between two values in excel

Steps:

  • Use the following formula in cell C15.
=C7+(C14-B7)*(C8-C7)/(B8-B7)

We want to find the interpolated value when the X Coordinate is 2.75. For this reason, we chose the first available X Coordinates smaller or greater than 2.75 and their corresponding Y Coordinates in this dataset.

how to interpolate between two values in excel

  • Hit Enter to see the interpolated value in cell C15.

Read More: How to Interpolate in Excel Graph


Method 5 – Interpolating between Two Values by Joining SLOPE and INTERCEPT Functions

We want to interpolate for X is 10.

Steps:

  • Insert a few cells to store the slope.

how to interpolate between two values in excel

  • Insert the following formula in cell E7:
=SLOPE(C5:C12,B5:B12)

The SLOPE function returns the slope/gradient of the linear regression line which is made by the points formed by given X and Y Coordinates.

  • Hit Enter.

how to interpolate between two values in excel

  • Use the following formula in cell E9 to find the Y-intercept.
=INTERCEPT(C5:C12,B5:B12)

The INTERCEPT function returns the Y-intercept of the linear regression line which is made by the points formed by given X and Y Coordinates.

  • Hit Enter to see the output in cell E9.

how to interpolate between two values in excel

  • Insert this formula in cell C15.
=E7*C14+E9

The formula is a basic straight-line formula, y=mx+c, where m is the slope and c is the intercept.

  • Hit Enter to see the interpolated value in cell C15.

how to interpolate between two values in excel

  • Technically, you could combine all the functions to remove the need for helper cells.

Read More: How to Interpolate Missing Data in Excel


Method 6 – Using the Excel GROWTH Function for Nonlinear Interpolation

Our dataset has a non-linear relation between Y and X Coordinates.

Steps: 

  • We want to interpolate a value between 5 and 8. Let it be 6.5.

  • Use the following formula in cell C15.
=GROWTH(C5:C12,B5:B12,C14)

how to interpolate between two values in excel

The GROWTH function returns the interpolated data by predicting the exponential growth of the X and Y Coordinates.

  • Hit Enter and you will see the interpolated value in cell C15.


Download the Practice Workbook


Related Articles


<< Go Back to Excel Interpolation | Excel for Statistics | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Meraz Al Nahian
Meraz Al Nahian

Md. Meraz Al Nahian has worked with the ExcelDemy project for over 1.5 years. He wrote 140+ articles for ExcelDemy. He also solved a lot of user problems and worked on dashboards. He is interested in data analysis, advanced Excel, statistics, and dashboards. He also likes to explore various Excel and VBA applications. He completed his graduation in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET). He enjoys exploring Excel-related features to gain efficiency... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo