Linear Interpolation Calculator
For use by professionals. No warranty; confirm results and design decisions with a licensed engineer. Site Terms
Calculator help
Hi! Ask me anything about using this calculator: what an input means, where to find a value, or why you got a result.
An AI assistant (Claude) that reads this page. It can make mistakes: check important numbers, and confirm design decisions with a licensed engineer.
Click here to provide feedback on this calculator
Your current inputs are sent with it, so we can see what you saw.
Step-by-step guide: How to Use Adicot's Linear Interpolation Calculator
This interpolation calculator finds a value between two known points on a straight line: y at a given x, or x at a given y. For a value between rows and columns of a table, use the bilinear interpolation calculator.
How to use it
Review the methodology below to make sure it aligns with your project's requirements, then:
- The calculator has three rows of x and y: the first and last are the two known points, (x1, y1) and (x2, y2), and the middle row is the point in between, (x, y).
- Fill in five of the six boxes and leave blank the one you want. Usually that is the middle y (y at a given x) or the middle x (x at a given y), but any box works.
- The blank box fills in as you type, and a graph of the line appears below. To see it filled in, choose "Show an example". If the middle point is outside the other two, the calculator says so: that is an extrapolation, not an interpolation.
Read more in our blog post, How to use Adicot's Linear Interpolation Calculator.
Methodology, equations and examples
Linear interpolation is a numerical method for estimating values between two known data points by assuming a straight line between them. It is a basic form of interpolation: when the data between two points is close to a straight line, linear interpolation fills in the values in between.
Linear interpolation is used in mathematics, computer graphics, data analysis and engineering. It gives a simple, quick approximation of missing or intermediate values, especially when the data lies close to a straight line. For more complex curves, or where a smoother fit is needed, other methods such as spline interpolation may be more appropriate.
To perform linear interpolation, we need two adjacent data points, (x1, y1) and (x2, y2). The goal is to estimate the value of an unknown point (x, y) on the line between them:
y = y1(x2 − x)/(x2 − x1) + y2(x − x1)/(x2 − x1)
Here (x − x1) is the distance from the first known point to the unknown point, (x2 − x) the distance from the unknown point to the second, and (x2 − x1) the distance between the two known points. Their ratios place the unknown point along the line joining the two known points. Solving the same line for x gives the x at a given y:
x = x1(y2 − y)/(y2 − y1) + x2(y − y1)/(y2 − y1)
Linear interpolation assumes a straight line between the points, which is not always accurate, particularly if the data follows a more complex pattern. In such cases spline interpolation or another method may give better results. Within a small range, though, linear interpolation is a simple and quick estimate.
Example
Suppose you want the total cooling capacity of a Bryant® packaged air conditioning unit from its performance data table, at these design conditions:
- Condenser entering air temperature: 79 °F
- Evaporator entering wet bulb temperature: 63 °F
From the manufacturer's table, at 63 °F entering wet bulb:
- x1 = 75 °F, y1 = 55.04 MBtuh (total capacity at 75 °F condenser entering air)
- x2 = 85 °F, y2 = 52.59 MBtuh (total capacity at 85 °F)
- x = 79 °F
Solution 1, graphically. Plot the two known points, (75 °F, 55.04 MBtuh) and (85 °F, 52.59 MBtuh), and draw a straight line between them. Draw a vertical line at x = 79 °F, and from where it meets the line, a horizontal line to the y-axis. It reads about 54 MBtuh.
Solution 2, by the equation.
y = 55.04 × (85 − 79)/(85 − 75) + 52.59 × (79 − 75)/(85 − 75) = 33.024 + 21.036 = 54.06 MBtuh
Solution 3, with the calculator. Choose "Show an example" above, or enter the same values and leave the middle y blank. The result is 54.06 MBtuh.
So at 79 °F condenser entering air, the total cooling capacity is about 54.06 MBtuh.
Why use linear interpolation
- Data approximation: estimate values between known data points, such as between the rows and columns of an equipment performance table.
- Data visualization: fill in missing or incomplete points to plot a continuous series.
- Function approximation: approximate a function from a set of discrete data points by joining them with straight lines, where the function itself is not known or is hard to compute.
- Time series: fill in missing values in a sequence from the values either side.
- Numerical methods: linear interpolation is a building block for more complex schemes, such as cubic spline interpolation.
To interpolate between four points, in two directions at once, use the bilinear interpolation calculator.