EDUCBA

EDUCBA

MENUMENU
  • Explore
    • Lifetime Membership
    • All in One Bundles
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Login
Home Excel Excel Resources Excel Tips Linear Interpolation in Excel

Linear Interpolation in Excel

Madhuri Thakur
Article byMadhuri Thakur

Updated August 22, 2023

Linear Interpolation In Excel

Excel Linear Interpolation (Table of Contents)
  • What is Interpolation?
  • Interpolation With Forecast Function in Excel
  • Examples of Linear Interpolation in  Excel

What is Interpolation?

In mathematics, interpolation is a method of creating new data points with the help of known data points. Interpolation estimates the value based on the existing available data values, which are relatable.

For Example – If we drive a bike at 60 Km/hour and reach a particular destination in 1 hour, and if we drive at 45 Km/hour and reached a particular destination in 45 minutes. So how long will it take to reach a destination if we drive at 30 Km/hour?

ADVERTISEMENT
Popular Course in this category
MS Excel Course Bundle - 36 Courses in 1 | 13 Mock Tests

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

Linear interpolation in excel 1-1

We can calculate the missing values in the above example using simple mathematics. We need to insert the below formula in cell B4.

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

Linear interpolation in excel 1-2

So based on the above formula, we can say it takes 30 minutes to reach the destination if we drive at 30 km/hour.

Linear interpolation in excel 1-3

Let’s try to break the above formula and understand the formula in detail.

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

In the above example, the formula’s last section, highlighted in red, calculates how much time taken changes whenever the speed of the bike changes by 1. In our example, the time taken changes by 1 minute when the speed of the bike changes by 1 km/hour.

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

The second section (in blue above) calculates how far the bike’s speed is away from the first speed of the bike given, then multiplies it by the value calculated above.  Based on our example, it is 30 (Cell A4) minus 60 (Cell A2), the result of which is then multiplied by 1 (which equals -30).

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

Finally, in the first section of the formula (in brown above), we add the first value of the bike’s speed.  In our example, this provides the final result of 60 + (-30)*(1) = 30 Minutes.  In school, we used the formula below to calculate the missing value of Y.

Y = Y1 + (X-X1)* (Y2-Y1)/(X2 – X1)

This is an example of how to calculate the missing values with the help of a manual formula to understand interpolation.

Excel has an inbuilt function that does a similar calculation, known as FORECAST Function. Now we will learn this function in detail.

Interpolation with Forecast Function in Excel

A forecast is a Worksheet Function available in MS Excel, and it uses linear regression to find the missing value. Forecast, as its name suggests, is used to forecast the future value of a data point, but it can also be used to interpolate a value. It is used to calculate the future value based on the Existing values of a specific data set.

Syntax of Forecast Function

Forecast syntax

Arguments of Forecast Function:

  •  x – It is a data point for which we want to know the resultant value.
  • Known_y’s – Range of cells containing the values of Y.
  • Known_x’s – Range of cells containing the values of X.

Now, considering the example above, let us try to use the Forecast function.

In our example,

x – Cell B4 (as we want to determine the time taken when the speed is 30 km/hour).

Known_y’s – Cell B2 to Cell B3 (Time taken for the known speed of bike).

Known_x’s – Cell A2 to Cell A3 (Speed of the bike already given for which we know the time taken).

So the final formula in cell B4 will be as below:

=FORECAST(A4,B2:B3,A2:A3)

forecast linear interpolation in excel 1-5

And as you can see, the final result is the same, i.e., 30 Minutes.

forecast linear interpolation in excel 1-6

For creating a chart, go to the Insert menu, click on Scatter, and then select Scatter With Smooth Lines and Markers.

linear Scatter chart

If we look at the below chart of the above example, we can say the data set has a linear relationship known as linear interpolation.

Time taken 1

Examples of Linear Interpolation in Excel

Let’s understand Linear Interpolation in Excel with some examples.

You can download this Linear Interpolation Excel Template here – Linear Interpolation Excel Template

Example #1

Suppose you have sales and profit data for previous years & want to know the current year’s profit if you achieve a certain level of sales.

Look at the below table. You have sales data from 2016 to 2018, and you want to know the profit if your sales are Rs. 40,00,000 in 2019.

forecast linear interpolation example 1-1

So with the help of the Forecast function, we can interpolate the profit of 2019 when sales are Rs. 4,000,000

The formula in cell C5 will be as below:

=FORECAST (B5, C2:C4, B2:B4)

forecast linear interpolation example 1-2

After using the Forecast formula, the answer is shown below.

forecast linear interpolation example 1-3

The result for the Forecast function will be Rs. 875,000 based on the sales & profit data available from 2016 to 2018.

sales and profit

In this example, the Forecast function interpolates the value based on all available data, not just starting and Endpoint. As you can see in the charts, profit is moving is exactly the same as sales. Even if we calculate the value manually, it will still give us the same result.

Example #2

We have data from the last 9 matches of the cricket team, which have wickets gone and runs scored by the team.

We want to determine how many runs the team will score if 8 wickets fall.

wickets and runs

So we will again use the same Forecast Function as above.

wicket and runs 1

After applying the formula, we get the result of 302 Runs if 8 wickets fall based on a linear regression of the last 9 matches played by the team.

wickets and runs 2

In this example, data was not linear; you can see that in the graph below. But still, the Forecast function helped us to interpolate the runs with the help of data from previous matches.

Match Scores

Things to Remember About Linear Interpolation in Excel

  • The forecast function is used to forecast/estimate the value based on the existing available values, but it can also help to interpolate the missing value.
  • If data is not linear, the Forecast function will not give you the accurate value based on linear interpolation, but it will give you the nearest value.
  • If x in the Forecast function is text or non-numeric, the Forecast function returns the #VALUE error.
  • If Known_x’s and Known_y’s do not contain any data or contain a different set of data points, Forecast Function will give a #N/A error.
  • If the variance of Known_x’s is zero, then the Forecast function gives the #DIV/O error.

Recommended Articles

This is a guide to Linear Interpolation in Excel. Here we discuss How to Use Linear Interpolation in Excel, practical examples, and a downloadable Excel template. You can also go through our other suggested articles –

  1. Linear Regression in Excel
  2. Linear Programming in Excel
  3. Statistics in Excel
  4. Interpolate in Excel
ADVERTISEMENT
MICROSOFT POWER BI Course Bundle - 8 Courses in 1
34+ Hours of HD Videos
8 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
ADVERTISEMENT
MS Excel & VBA for Data Science Course Bundle - 24 Courses in 1 | 10 Mock Tests
87+ Hours of HD Videos
24 Courses
10 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
ADVERTISEMENT
All-in-One Financial Analyst Masters Training Program Bundle - 550+ Courses | 300+ Mock Tests | 2000+ Hours | Lifetime |
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
4.9
ADVERTISEMENT
All-in-One Data Science Bundle - 400+ Courses | 550+ Mock Tests | 2000+ Hours | Lifetime |
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
4.7
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download Linear Interpolation Excel Template

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Linear Interpolation Excel Template

EDUCBA

डाउनलोड Linear Interpolation Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Extended Cyber Monday Price Drop! All in One Universal Bundle (3700+ Courses) @ 🎁 90% OFF - Ends in ENROLL NOW