Skip to main content
math

Linear Interpolation Calculator

Estimate a value between two known data points using linear interpolation (LERP).

Reviewed by Chase FloiedUpdated

This free online linear interpolation calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

The x value at which to estimate y

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Linear Interpolation Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Linear Interpolation Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Linear Interpolation Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Linear Interpolation Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Linear Interpolation Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Estimate a value between two known data points using linear interpolation (LERP). The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Linear Interpolation Calculator

Linear interpolation (often abbreviated LERP) estimates a value between two known data points by assuming a straight-line relationship. Given two points (x0, y0) and (x1, y1), and a target x value between x0 and x1, the interpolated y value lies on the straight line connecting the two points. This technique is ubiquitous in numerical analysis, computer graphics (color blending, animation), engineering (reading between table entries), and data science (filling in missing data). It is the simplest form of interpolation and provides exact results when the underlying relationship is truly linear. For nonlinear data, it gives an approximation whose accuracy depends on how close together the data points are. The interpolation parameter t ranges from 0 (at the first point) to 1 (at the second point), providing a normalized measure of position between the two endpoints.

The Math Behind It

Linear interpolation is based on the equation of the line passing through two points. The parameter t = (x - x0) / (x1 - x0) measures how far x is along the interval [x0, x1], with t = 0 at x0 and t = 1 at x1. The interpolated value is y = y0 + t × (y1 - y0) = (1 - t) × y0 + t × y1. This is a weighted average of y0 and y1, with weights (1 - t) and t. When t is between 0 and 1, this is interpolation; when t is outside this range, it is extrapolation (which is less reliable). Linear interpolation is exact for linear functions and provides a first-order approximation for smooth nonlinear functions (the error is proportional to (x1 - x0)^2). Higher-order methods like polynomial interpolation, splines, and cubic Hermite interpolation provide better accuracy for nonlinear data but are more complex. In computer graphics, LERP is used for blending colors, positions, and orientations. Bilinear and trilinear interpolation extend LERP to 2D and 3D grids. The LERP function is one of the most fundamental building blocks in scientific computing.

Formula Reference

Linear Interpolation (LERP)

y = y₀ + ((x - x₀) / (x₁ - x₀)) × (y₁ - y₀)

Variables: (x₀, y₀), (x₁, y₁) = known points; x = target value between x₀ and x₁

Parametric Form

y = (1 - t) × y₀ + t × y₁, where t = (x - x₀) / (x₁ - x₀)

Variables: t = interpolation parameter (0 at first point, 1 at second point)

Worked Examples

Example 1: Interpolating between two data points

Known: (1, 10) and (5, 30). Estimate y at x = 3.

Step 1:Compute t: (3 - 1) / (5 - 1) = 2 / 4 = 0.5
Step 2:Interpolate: y = 10 + 0.5 × (30 - 10) = 10 + 10 = 20
Step 3:Alternatively: y = 0.5 × 10 + 0.5 × 30 = 5 + 15 = 20

At x = 3, y = 20

Example 2: Interpolation with non-midpoint target

Known: (0, 100) and (10, 200). Estimate y at x = 7.

Step 1:Compute t: (7 - 0) / (10 - 0) = 0.7
Step 2:Interpolate: y = 100 + 0.7 × (200 - 100) = 100 + 70 = 170

At x = 7, y = 170

Common Mistakes & Tips

  • !Using extrapolation (t outside 0 to 1) without recognizing reduced accuracy.
  • !Swapping x0 and x1, which changes the sign of t.
  • !Applying linear interpolation to highly nonlinear data without considering the error.
  • !Confusing the x and y roles in the formula.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

What is the difference between interpolation and extrapolation?

Interpolation estimates within the range of known data (t between 0 and 1). Extrapolation estimates outside the range (t < 0 or t > 1) and is less reliable.

How accurate is linear interpolation?

It is exact for linear data. For smooth nonlinear data, the error decreases quadratically as the data points get closer together.

What is bilinear interpolation?

Bilinear interpolation extends LERP to 2D grids by performing linear interpolation in one direction, then in the other direction. It is commonly used in image processing.