Linear Interpolation Calculator

Interpolate a y-value for a given x between two known points using linear interpolation (LERP). Supports extrapolation, multi-point error analysis, and shows slope, equation, and interpolation para...

Presets

The x-value to interpolate
Interpolated y
98.600000
y value at x = 37.0000
Slope (m)
1.800000
Rate of change Δy/Δx between the two points
y-Intercept (b)
32.000000
Where the line crosses y-axis (y = mx + b)
Interpolation Parameter (t)
0.370000
Between 0 and 1 → interpolation
Type
Interpolation ✓
Target x is within the given interval
Equation
y = 1.8000x + 32.0000
Linear equation through the two points

Position Visualization

x₀
x₁
x

Y-Value Magnitude Bars

y₀
32.0000
y₁
212.0000
y(x)
98.6000

Interpolation Points Table

xy (interpolated)Position (t)Type
0.000032.00000.0000Interp
10.000050.00000.1000Interp
20.000068.00000.2000Interp
30.000086.00000.3000Interp
40.0000104.00000.4000Interp
50.0000122.00000.5000Interp
60.0000140.00000.6000Interp
70.0000158.00000.7000Interp
80.0000176.00000.8000Interp
90.0000194.00000.9000Interp
100.0000212.00001.0000Interp
Planning notes, formulas, and examples

About the Linear Interpolation Calculator

Linear interpolation is the simplest and most widely used method for estimating unknown values between two known data points. Given two points (x₀, y₀) and (x₁, y₁), linear interpolation finds the y-value that corresponds to any target x by assuming a straight-line relationship between the points.

The formula y = y₀ + (x − x₀)(y₁ − y₀)/(x₁ − x₀) — often called LERP in computer graphics and game development — is fundamental across engineering, science, finance, and data analysis. Whether you're reading values between entries in a lookup table, animating between keyframes, or estimating sensor data between samples, linear interpolation provides a quick, reliable estimate.

This calculator computes the interpolated value along with the slope, y-intercept, linear equation, and the interpolation parameter t (where t = 0 at the first point and t = 1 at the second). It automatically detects whether your target x falls within the interval (interpolation) or outside it (extrapolation) and flags the result accordingly.

In multi-point mode, you can supply additional known data points to evaluate how well the linear model fits real data. The tool computes the error between the actual y-values and the linearly predicted values, giving you a quick measure of linearity. Use the presets to explore common scenarios from temperature conversion to population estimation.

When This Page Helps

Linear Interpolation Calculator helps you solve linear interpolation problems quickly while keeping each step transparent. Instead of redoing long algebra by hand, you can enter x₀ (first x), y₀ (first y), x₁ (second x) once and immediately inspect Interpolated y, Slope (m), y-Intercept (b) to validate your work.

How to Use the Inputs

  1. Enter x₀ (first x) and y₀ (first y) in the input fields.
  2. Select the mode, method, or precision options that match your linear interpolation problem.
  3. Read Interpolated y first, then use Slope (m) to confirm your setup is correct.
  4. Try a preset such as "Temperature 0–100°C" to test a known case quickly.
Formula used
y = y₀ + (x − x₀) × (y₁ − y₀) / (x₁ − x₀). Equivalently: y = (1 − t) × y₀ + t × y₁ where t = (x − x₀) / (x₁ − x₀). Slope m = (y₁ − y₀) / (x₁ − x₀), y-intercept b = y₀ − m × x₀.

Example Calculation

Result: Interpolated y shown by the calculator

Using the preset "Temperature 0–100°C", the calculator evaluates the linear interpolation setup, applies the selected algebra rules, and reports Interpolated y with supporting checks so you can verify each transformation.

Tips & Best Practices

  • If t is between 0 and 1, you're interpolating; outside that range, you're extrapolating
  • Extrapolation can be unreliable — real-world data rarely follows a straight line beyond measured points
  • Use multi-point mode to check if linear interpolation is appropriate for your data
  • For highly non-linear data, consider polynomial or spline interpolation instead
  • LERP is commonly used in animation: t=0 is the start keyframe, t=1 is the end keyframe

How This Linear Interpolation Calculator Works

This calculator takes x₀ (first x), y₀ (first y), x₁ (second x), y₁ (second y) and applies the relevant linear interpolation relationships from your chosen method. It returns both final and intermediate values so you can audit the process instead of treating it as a black box.

Interpreting Results

Start with the primary output, then use Interpolated y, Slope (m), y-Intercept (b), Interpolation Parameter (t) to confirm signs, magnitude, and internal consistency. If anything looks off, change one input and compare the updated outputs to isolate the issue quickly.

Study Strategy

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Linear interpolation (LERP) estimates a value between two known data points by assuming a straight-line relationship. It's the simplest form of interpolation and works well when the underlying function is approximately linear between the points.