Linear Interpolation Calculator NZ

This calculator performs linear interpolation, estimating a value that lies between two known data points by assuming a straight line connects them. Interpolation is one of the most practical techniques in all of applied mathematics: whenever you have data at certain points and need a value in between, linear interpolation gives a quick, reasonable estimate. Engineers read between the lines of a table, scientists fill gaps in measurements, financial analysts estimate rates between quoted terms, and graphics and animation blend between values, a process often called lerp. The idea is simple: given two points, you assume the quantity changes at a constant rate between them and read off the value at your point of interest. This tool does it instantly. You enter the coordinates of the two known points and the x value where you want an estimate, and the calculator returns the interpolated y value, along with the slope of the line, the x value you queried, and whether it lies between the two points. The results update as you type. Use it to read between table values, to estimate a rate or measurement at an intermediate point, for engineering and science work, or for any situation needing a value between two knowns. The formula takes the first point's y value and adds the change in x from the first point, multiplied by the slope, the rise over run between the two points. A note on accuracy: linear interpolation assumes a straight line between the points, which is a good approximation when they are close together or the underlying relationship is nearly linear, but less accurate for strongly curved data. If your query x lies outside the two points, the calculator still returns a value, but that is extrapolation, projecting beyond the data, which is riskier and should be treated with caution.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Premium Homes: warmer, drier, healthier. No condensation, ever.
Advertise on this page
30
interpolated y value
Slope10
x value3
Within range?Yes (interpolation)

y = y1 + (x - x1) x (y2 - y1) / (x2 - x1). Assumes a straight line between the points. Querying an x outside the points is extrapolation, which is less reliable.

How it works

The slope of the line between the two points is the change in y divided by the change in x. The interpolated value is the first point's y plus the distance of your x from the first point's x, multiplied by that slope. This assumes the quantity changes at a constant rate between the two known points.

Worked example

Between the points (0, 0) and (10, 100), the slope is 100 over 10, which is 10. To estimate y at x equals 3, take the first y of 0 and add 3 times the slope: 0 plus 3 times 10, which is 30. Since 3 lies between 0 and 10, this is interpolation rather than the riskier extrapolation.

Related calculators