Math calculators

Interpolation Calculator

Updated Jun 20, 2026 By Jehan Wadia
Formulas
Coordinate Inputs
Fill in exactly five fields and leave one blank — the calculator solves for the empty field.
Point X Y
Point 1
Point 2
Point 3
Units are accepted (e.g. 100%, 5kg, 3.2cm) but are not converted — keep your units consistent. Only the numeric part is used.
Result
Y₃ = 40
Solved for: Y₃
X₃ is 50% of the way from X₁ to X₂ (interpolation).
Line Equation & Slope-Intercept Form
Step-by-Step Solution
Graph
Graph of the interpolation line.
The dashed ring marks the point containing the solved value.

Introduction

This interpolation calculator finds a missing value on a straight line between two known points. You give it five out of six values — the X and Y for Point 1, Point 2, and Point 3 — and it solves for the one you left blank. It works for both linear interpolation (when your point falls between the two known points) and extrapolation (when it falls outside them).

The calculator shows you the answer, a full step-by-step solution, the slope and equation of the line, and a graph of all three points. Just type your numbers into the table, leave one field empty, and press Calculate.

How to Use Our Interpolation Calculator

Enter five known values across three coordinate points and leave one field blank. The calculator will solve for the missing value, show the line equation, and display a step-by-step solution with a graph.

X₁ (Point 1, X value): Type the x-coordinate of your first known point. Leave blank if this is the value you want to find.

Y₁ (Point 1, Y value): Type the y-coordinate of your first known point. Leave blank if this is the value you want to find.

X₂ (Point 2, X value): Type the x-coordinate of your second known point. Leave blank if this is the value you want to find.

Y₂ (Point 2, Y value): Type the y-coordinate of your second known point. Leave blank if this is the value you want to find.

X₃ (Point 3, X value): Type the x-coordinate of your third point. Leave blank if this is the value you want to find.

Y₃ (Point 3, Y value): Type the y-coordinate of your third point. Leave blank if this is the value you want to find.

Calculate Button: Press this button after you fill in five fields. The calculator will find the missing value, show the slope and y-intercept, display the full line equation, and draw a graph of all three points.

Reset Button: Press this button to clear all fields and start over with new values.

What Is Linear Interpolation?

Linear interpolation is a way to find a missing value between two known points on a straight line. Think of it like this: if you know two points on a graph, you can draw a line through them. Any point along that line can be figured out using simple math. The word "interpolation" means finding a value between two known values. If the missing value falls outside the two known points, it is called extrapolation instead.

How Linear Interpolation Works

A straight line connects two points: Point 1 and Point 2. Each point has an X value and a Y value. When you know both points, the line between them is fixed. You can then pick any X value and find its matching Y value on that line, or pick a Y value and find its matching X. The math behind it uses the fact that the slope (steepness) of the line stays the same everywhere. The slope is calculated as the change in Y divided by the change in X — you can verify this independently with our Slope Calculator. If you need to find the point exactly halfway between two coordinates, our Midpoint Calculator is a handy companion tool.

The Interpolation Formula

The standard linear interpolation formula is:

Y₃ = Y₁ + (X₃ − X₁) × (Y₂ − Y₁) / (X₂ − X₁)

This formula takes the two known points — (X₁, Y₁) and (X₂, Y₂) — and uses them to find the Y value at a third X position. You can also rearrange this formula to solve for any of the six values (X₁, Y₁, X₂, Y₂, X₃, or Y₃) as long as the other five are known. At its core, this formula relies on computing a rate of change between the two reference points and applying it to the third. If you need to find the straight-line distance between your two known points rather than interpolating along the line, try our Distance Calculator.

When Is Interpolation Used?

Linear interpolation is used in many fields. Engineers use it to estimate values from data tables. Scientists use it to fill in gaps between measurements. It is also common in computer graphics, finance, and everyday math. Any time you have two data points and need to estimate a value between them, linear interpolation is a fast and reliable method. For larger datasets where you want to fit a best-fit line through many points instead of just two, a Linear Regression Calculator is the better choice. And when you need to quantify how far an estimated value is from an actual measurement, our Percent Error Calculator can help you evaluate accuracy. You might also find our Percentage Calculator useful for quickly converting the position ratio into a percentage, or our Percent Change Calculator to measure how much a value has shifted between two data points.

Interpolation vs. Extrapolation

When the third point falls between Point 1 and Point 2, the result is an interpolation. When it falls outside that range, the result is an extrapolation. Interpolation is generally more accurate because you are staying within your known data. Extrapolation assumes the same straight-line trend continues beyond your data, which may not always be true.


Formulas used

Linear Interpolation Relationship
\frac{y_2 - y_1}{x_2 - x_1} = \frac{y_3 - y_1}{x_3 - x_1}
Solve for Y₃ (Interpolated Value)
y_3 = y_1 + \frac{(x_3 - x_1)(y_2 - y_1)}{x_2 - x_1}
Solve for X₃
x_3 = x_1 + \frac{(y_3 - y_1)(x_2 - x_1)}{y_2 - y_1}
Solve for Y₁
y_1 = \frac{y_2(x_3 - x_1) - y_3(x_2 - x_1)}{x_3 - x_2}
Slope
m = \frac{y_2 - y_1}{x_2 - x_1}
Slope-Intercept Line Equation
y = mx + b, \quad b = y_1 - m \cdot x_1

Frequently asked questions

Can I solve for any of the six values?

Yes. You can leave any one of the six fields blank — X₁, Y₁, X₂, Y₂, X₃, or Y₃ — and the calculator will solve for it. Just fill in the other five and press Calculate.

What happens if I leave more than one field blank?

The calculator needs exactly five values to work. If you leave two or more fields blank, it will show an error. Go back and fill in more fields until only one is empty.

What happens if I fill in all six fields?

The calculator will ask you to leave one field blank. It can only solve for a missing value, so it needs exactly one empty field to work.

Can I use decimals or negative numbers?

Yes. You can type decimals like 3.75 and negative numbers like -12. The calculator handles both without any issues.

Can I type units like kg or cm into the fields?

Yes, you can type units like 5kg or 3.2cm. The calculator will read the number and ignore the unit text. However, it does not convert between units, so make sure all your values use the same unit.

Why do I get an error that says the slope is undefined?

This happens when X₁ and X₂ are the same number. Two points with the same X value make a vertical line, and a vertical line has no defined slope. Change one of the X values so they are different.

What does the percentage in the result mean?

It tells you where Point 3 sits relative to Point 1 and Point 2. For example, 50% means Point 3 is exactly halfway between them. A value between 0% and 100% means interpolation. A value below 0% or above 100% means extrapolation.

Is the result exact?

The calculator gives answers rounded to six decimal places. For most uses this is very accurate. The underlying math uses standard floating-point arithmetic.

Does this calculator work on a phone?

Yes. The layout, inputs, and graph all resize to fit smaller screens. You can use it on any phone, tablet, or computer with a web browser.

What is the dashed circle on the graph?

The dashed circle marks the point that contains the solved value. It makes it easy to see which point the calculator found for you.

Can this calculator do curved or nonlinear interpolation?

No. This tool only does linear interpolation, which means it fits a straight line through your points. For curved data you would need polynomial or spline interpolation, which this calculator does not support.

What is the line equation shown in the result?

It is the equation of the straight line through Point 1 and Point 2, written in slope-intercept form: y = mx + b. Here m is the slope and b is the y-intercept. Point 3 also lies on this same line.

Can I hide the step-by-step solution?

Yes. Click the Hide Steps button above the solution section. Click it again to show the steps. This lets you keep the page clean if you only need the final answer.

Do I need to enter the points in order?

No. You can enter your values in any order. The calculator treats Point 1 and Point 2 as the two reference points that define the line, and Point 3 as the point being interpolated or extrapolated.

What if my two known points have the same Y value?

That means the line is horizontal with a slope of zero. The calculator can still find a missing Y value (it will equal Y₁). However, it cannot solve for a missing X on a horizontal line because every X gives the same Y.