Example 1
- x1 = 0
- y1 = 0
- x2 = 10
- y2 = 10
- x = 5
5
What is y between (0, 0) and (10, 10) at x = 5? 5. Midpoint of the segment.
Type (x₁, y₁), (x₂, y₂) and x. Linear interpolation places y on the segment between those points. 0, 0, 10, 10 and 5 give 5. 1, 2, 3, 6 and 2 give 4.
When x₁ = x₂ the calculator returns y₁; it does not divide by zero. This is not y from a separately typed ax + b.
Enter data and click Calculate.
Linear interpolation looks for y on the segment between (x₁, y₁) and (x₂, y₂). The formula is y₁ + (x − x₁) · (y₂ − y₁)/(x₂ − x₁). With 0, 0, 10, 10 and x = 5 you sit at the midpoint and y = 5.
The fields are x1, y1, x2, y2 and x. 1, 2, 3, 6 and 2: from (1, 2) to (3, 6), x = 2 is halfway, y = 4. 0, 0, 2, 10 and 1 give 5, because half of the rise of 10.
When x1 = x2 the denominator is zero. The implementation returns y1. 5, 7, 5, 9 and 3 give 7, not Infinity. A vertical segment has no slope in this code.
Linear function value is on the neighbouring page when you know a and b, not two points. Here you build the line from the nodes.
The header units switch does not multiply anything. 0, 0, 10, 10 and 5 stay 5 whatever the label says.
0, 0, 10, 10 and 5 give 5. 1, 2, 3, 6 and 2 give 4. 0, 0, 2, 10 and 1 give 5. When x1 = x2 you keep y1.
y = y₁ + (x − x₁) · (y₂ − y₁)/(x₂ − x₁), when x₂ ≠ x₁; otherwise y₁
Linear interpolation places y on the segment. 0, 0, 10, 10 and 5 give 5. 1, 2, 3, 6 and 2 give 4. When x1 = x2 you keep y1.
5
What is y between (0, 0) and (10, 10) at x = 5? 5. Midpoint of the segment.
4
What is y between (1, 2) and (3, 6) at x = 2? 4. Half of the rise of 4.
5
What is y between (0, 0) and (2, 10) at x = 1? 5. Half of the rise of 10.
5. Midpoint of the segment, half of the rise.
y on the segment between two points. Formula y₁ + (x − x₁)(y₂ − y₁)/(x₂ − x₁).
4. x is halfway, y rises by 2 from 2 to 6.
5. Half of the rise of 10.
The calculator returns y1. It does not divide by zero. 5, 7, 5, 9 and 3 give 7.
Yes. The algebra does not stop extrapolation. 0, 0, 10, 10 and 15 give 15.
Here two points. There slope and intercept. Neighbouring cards.
The fifth. The first four are the nodes (x1, y1) and (x2, y2).
Not at the same x. (0, 0) and (10, 10) or the swap both give 5 at the midpoint.
Yes. 0, 0, 10, 10 and 2.5 give 2.5.
The calculator computes the same formula as the definition below.
Page updated in 2026.