Interpolation and Extrapolation Calculator
Linear interpolation formula: y = y₁ + (x − x₁)·(y₂ − y₁)/(x₂ − x₁). Enter two points or a table and get the value instantly; it also extrapolates outside the range.
Our online interpolation and extrapolation calculator is an accurate and easy-to-use tool designed for engineers, scientists, mathematicians, and anyone who needs to estimate values based on known data. It uses formulas based on classical linear and polynomial interpolation methods as well as extrapolation techniques to predict values outside the range of existing data. These methodologies have been widely used in a variety of disciplines, from physics and engineering to economics and data analysis.
The calculator allows you to enter custom values, select the number of decimal places, and define units of measurement. It also offers an intuitive interface with dynamic graphics to visualize the results clearly and effectively. It is a versatile tool for professionals and students around the world. Optimize your calculations and improve your analysis with our online interpolation and extrapolation calculator!
In almost every field of science and engineering, we work with data. However, we rarely have all the data we need. We measure the temperature at 8 AM and 10 AM, but what was the temperature at 9:15 AM? We obtain the efficiency of an engine at 2000 and 3000 RPM, but what will its efficiency be at 2450 RPM? This is where interpolation and extrapolation come into play: they are the mathematical tools that allow us to make intelligent estimates to predict unknown values from those we already know.
The need to estimate values is not new. Its roots go back to antiquity, long before computers.
-
Ancient Astronomy: Greek astronomers, such as Hipparchus (2nd century BC), and later Ptolemy, pioneered the use of interpolation. To predict the position of the planets and stars, they created trigonometric tables (such as tables of sines and cosines). These tables did not contain all possible angles, so they developed methods to estimate intermediate values, laying the foundation for interpolation.
-
The Calculus Revolution: In the 17th century, with the development of calculus, interpolation took a giant leap forward. Isaac Newton developed his famous "divided difference interpolation formula," a very powerful method for fitting a polynomial (a smooth curve) that passed exactly through a set of known points. Almost at the same time, Joseph-Louis Lagrange developed an alternative polynomial method that is conceptually simpler.
-
The Digital Age: With the advent of computers in the 20th century, interpolation became a cornerstone of numerical analysis. Methods that were previously tedious to calculate by hand could now be performed in seconds, allowing their use in fields as diverse as aircraft design, digital image processing, and financial modeling.
How Does Linear Interpolation Work? (The Simplest Method)
The most basic and common form of interpolation is linear. The idea is incredibly intuitive: if you have two known data points, you assume the relationship between them is a straight line and find your unknown value somewhere on that line.
Let's imagine we have two known points:
-
Point 1: (X1, Y1)
-
Point 2: (X2, Y2)
And we want to find the value of Y for a new point X that lies between X1 and X2.
1. Calculate the Slope (the steepness of the line): First, we calculate the slope (m) of the straight line joining our two points. The slope tells us how much Y changes for every unit that X changes.

Once we have the slope, we can use the equation of the line to find our unknown Y. The formula is derived from the idea that the slope between the first point and our new point must be the same as the total slope.

Substituting the slope formula, we obtain the complete equation for linear interpolation:

Step-by-step example
Water density is 998.207 kg/m³ at 20 °C and 997.047 kg/m³ at 25 °C. What is it at 22 °C?
1. Slope: (997.047 − 998.207) / (25 − 20) = −0.2320 kg/m³ per °C.
2. Distance from the first point: 22 − 20 = 2 °C.
3. y = 998.207 + 2 × (−0.2320) = 997.743 kg/m³.
The true value at 22 °C is 997.773 kg/m³: linear interpolation is off by 0.030 kg/m³ because the real curve is not a straight line. The closer your points, the smaller the error.
Extrapolation example
With the same points, what is the density at 27 °C? Now x is outside the measured range (20 to 25 °C):
y = 998.207 + (27 − 20) × (−0.2320) = 996.583 kg/m³.
The true value is 996.515 kg/m³: the error grows to 0.068 kg/m³, more than twice the interpolation error, and it keeps growing the farther you go from the measured range.
When to use linear interpolation
Yes: steam tables, calibration tables, tank strapping tables and certificates with closely spaced points.
Carefully: strongly non-linear curves (thermocouples, densities over wide ranges). There a polynomial regression works better, and you can find one on AxoTek too.
No: extrapolating far beyond the measured range.
Frequently asked questions
What is double (bilinear) interpolation?
Interpolating in one variable and then in another, for example in steam tables with pressure and temperature.
How do I interpolate in Excel?
Use =FORECAST.LINEAR(x, {y1,y2}, {x1,x2}) or type the interpolation formula directly in the cell.
How accurate is the result?
As accurate as your data and the linearity between the points. The calculator plots the line so you can check the trend.
What is the difference between interpolation and extrapolation?
Interpolation estimates a value inside the range of the known data; extrapolation estimates it outside. Extrapolation assumes the trend continues beyond the data, so its error grows quickly.
