Linear Interpolation Calculator

    Enter two known points and a target x to estimate y on the line between them. The calculator flags extrapolation when x is outside the interval.

    Point 1
    Point 2
    Interpolated y value
    40
    Rate of change
    10
    Position between points
    0.4
    Quick check
    The target x is 40% of the interval from point 1 to point 2.
    Change from point 1 in y: 40.
    Estimated value: 40.
    Linear model
    Slope: 10; intercept: 0.

    Linear interpolation estimates a y value at a target x between two known points, assuming the change between those points is linear.

    Linear interpolation from two known points

    Linear interpolation estimates a y value for a target x when two known points are assumed to be connected by a straight line.

    Use neighboring points
    For a table lookup, choose the two rows that surround the target x. The method assumes the interval between them is linear.

    y is the estimated value, x is the target coordinate, and x1, y1, x2, y2 are the two known points.

    The same line can be shown with slope and intercept, which is useful for checking the result by hand.

    Slope, fraction, and line equation

    k is the slope, and x1, y1, x2, y2 are the known point coordinates.

    The slope shows how much y changes for one unit of x.

    t is the fraction of the interval, x is the target coordinate, and x1 and x2 are the interval endpoints.

    The fraction t shows where the target x sits between the two selected points.

    b is the intercept, k is the slope, and x and y are coordinates on the line.

    The intercept form is another way to check the line through the two points.

    tMeaning
    0x equals x1
    0.5x is halfway between x1 and x2
    1x equals x2
    less than 0extrapolation to the left of the selected interval
    greater than 1extrapolation to the right of the selected interval

    Table lookup example

    Suppose a table gives 999.7 at and 998.2 at. To estimate the value at, use those two neighboring points.

    y is the estimate at x = 15; x = 10 and x = 20 are the neighboring points.

    The numbers are neutral examples for the method, not a reference table.

    1. Choose the two neighboring table rows around the target x.
    2. Make sure both rows use the same units.
    3. Enter the two points and the target x.
    4. Check whether the result is interpolation or extrapolation.

    Interpolation and extrapolation

    Interpolation stays inside the interval between the selected points. If x falls outside that interval, the calculator can still extend the line, but the result is extrapolation.

    Extrapolation is less reliable
    The farther x is from the known interval, the more the answer depends on the assumption that the linear trend continues.

    Use cases

    • Table values - estimate between two adjacent rows.
    • Measurements - estimate an intermediate reading between two observations.
    • Engineering profiles - interpolate along a simple linear segment.
    • Graphics and animation - move smoothly between two states.
    • School problems - check a value on a straight line.
    Convert dates to numbers first
    For dates, use a numeric scale such as days, hours, Unix time, or period number before interpolating.

    Method limits

    • If x1 and x2 are equal, the two points form a vertical line and y as a function of x is not defined.
    • The calculator does not choose rows from a larger table automatically.
    • For nonlinear data, a straight-line estimate may be rough even inside the interval.
    • Displayed results are rounded; use enough significant digits in the inputs.
    Interpolation versus regression
    Interpolation uses the line through two selected points. Linear regression fits a trend line to many observations and usually does not pass through every point.

    Frequently Asked Questions

    Sources and References

    Calculations are based on the listed reference sources. Links open in a new tab.

    Updated:

    Related Tools