Interpolation and Extrapolation: Definition, Method and Examples

MathPublished

Interpolation and Extrapolation: Definition, Method and Examples

Interpolation estimates a value within the range of known data, while extrapolation estimates beyond that range. Both are mathematical estimates, but extrapolation is usually less reliable because the observed pattern may not continue.

What are interpolation and extrapolation?

Interpolation is the process of predicting an unknown value that falls entirely inside the minimum and maximum boundaries of a known set of data points. Because the behavior of the data is already established between these limits, interpolation provides a high degree of confidence.


Extrapolation is the process of predicting an unknown value that falls outside the boundaries of the known data. This requires extending the observed trend forward or backward into areas where no actual measurements have been taken.


Interpolation works within the data limits, while extrapolation predicts outside them.


When data points are plotted as scatter plots, a trend often becomes visible. Extending a line through these points allows us to make both types of estimates.


A line graph shows known data points between x equals 2 and x equals 8. A yellow point at x equals 5 illustrates interpolation within the range. An orange point at x equals 11 illustrates extrapolation beyond the range.

Locate the observed data range

To decide whether an estimate is an interpolation or an extrapolation, we must identify the minimum and maximum inputs (usually the xx-values) from the known data set.


If the input value for the prediction falls completely between the smallest and largest recorded xx-values, the calculation is an interpolation. If the input value is strictly less than the smallest recorded xx-value or strictly greater than the largest recorded xx-value, the calculation is an extrapolation.

A number line highlighting a known data range from x equals 10 to x equals 40. Values between 10 and 40 are marked as Interpolation. Values outside this interval are marked as Extrapolation.

Estimate within the range

When calculating an interpolation manually, we usually assume the relationship between two adjacent known points is a straight line. The linear interpolation formula applies the slope between a starting point (x1,y1)(x_{1}, y_{1}) and an ending point (x2,y2)(x_{2}, y_{2}) to find the unknown output yy for a specific input xx.


The formula is:

y=y1+y2−y1x2−x1×(x−x1)y = y_{1} + \dfrac{y_{2} - y_{1}}{x_{2} - x_{1}} \times (x - x_{1})

The term y2−y1x2−x1\dfrac{y_{2} - y_{1}}{x_{2} - x_{1}} finds the rate of change. We multiply this rate by the distance from our starting point, (x−x1)(x - x_{1}), and add it to our starting value y1y_{1}.

Example 1: Interpolating a midway value


Question: A scientist records a temperature of 12∘C12^\circ\text{C} at 22 hours and 24∘C24^\circ\text{C} at 66 hours. Assuming a constant rate of change, what is the estimated temperature at 55 hours?


Method:

  1. Identify the known points: (x1,y1)=(2,12)(x_{1}, y_{1}) = (2, 12) and (x2,y2)=(6,24)(x_{2}, y_{2}) = (6, 24).
  2. Identify the target input value: x=5x = 5. Since 55 is between 22 and 66, this is interpolation.
  3. Substitute the values into the linear formula:

y=12+24−126−2×(5−2)y = 12 + \dfrac{24 - 12}{6 - 2} \times (5 - 2)

  1. Simplify the expression:

y=12+124×(3)y = 12 + \dfrac{12}{4} \times (3)

y=12+3×3y = 12 + 3 \times 3

y=12+9y = 12 + 9

y=21y = 21

Answer: The estimated temperature is 21∘C21^\circ\text{C}.


Check: The temperature rises 12∘C12^\circ\text{C} over 44 hours, which is 3∘C3^\circ\text{C} per hour. Starting from 12∘C12^\circ\text{C}, after 33 additional hours, the temperature should be 12+3×3=2112 + 3 \times 3 = 21.

Estimate beyond the range cautiously

If the target input value falls outside the observed data, we use a line of best fit or apply the same linear formula to extend the trend. This is extrapolation.


Because extrapolation extends the line into unknown territory, we must assume that the slope remains identical to the slope established by the known points.


Example 2: Extrapolating a future value


Question: A company has 4040 employees in month 33 and 7070 employees in month 88. If this growth trend continues linearly, how many employees will the company have in month 1212?


Method:

  1. Identify the known points: (3,40)(3, 40) and (8,70)(8, 70).
  2. Identify the target input: x=12x = 12. Because 1212 is greater than the maximum known value of 88, this is extrapolation.
  3. Apply the formula:

y=40+70−408−3×(12−3)y = 40 + \dfrac{70 - 40}{8 - 3} \times (12 - 3)


  1. Calculate the result:

y=40+305×(9)y = 40 + \dfrac{30}{5} \times (9)

y=40+6×9y = 40 + 6 \times 9

y=40+54y = 40 + 54

y=94y = 94

Answer: The company is predicted to have 9494 employees.


Check: The rate is 66 employees per month. Month 1212 is 44 months after month 88. Adding 4×6=244 \times 6 = 24 to the 7070 employees present in month 88 gives 9494.

State reliability and assumptions

Calculations within the data boundaries are generally reliable. However, extending a line blindly can lead to extreme errors. Real-world correlation often changes over time. A plant stops growing eventually, and a braking vehicle cannot drop below a speed of zero.


When interpreting data graphs, extrapolating too far past the known limits forces you to make an unsupported assumption that the future will behave exactly like the past.


A graph comparing a linear extrapolation line that shoots upward against the true data curve that flattens out, showing a large prediction error.


Extrapolation produces large errors if the relationship naturally changes outside the observed limits.

Worked examples

Evaluating linear equations is straightforward mathematically, but the final answer must always be reviewed to ensure it is physically possible in the context of the problem.


Example 3: Extrapolating to an impossible result


Question: A hot air balloon is descending steadily. At 1010 minutes, its altitude is 600600 meters. At 3030 minutes, its altitude is 200200 meters. Using a linear model, what is its predicted altitude at 6060 minutes?


Method:

  1. Identify the points: (10,600)(10, 600) and (30,200)(30, 200).
  2. The requested input is x=60x = 60, which is beyond the known data. This is extrapolation.
  3. Substitute into the formula:

y=600+200−60030−10×(60−10)y = 600 + \dfrac{200 - 600}{30 - 10} \times (60 - 10)

  1. Calculate the slope and prediction:

y=600+−40020×50y = 600 + \dfrac{-400}{20} \times 50

y=600−20×50y = 600 - 20 \times 50

y=600−1000y = 600 - 1000

y=−400y = -400

Answer: The formula predicts an altitude of −400-400 meters.


Check: Since the balloon hits the ground at 00 meters, a negative altitude is physically impossible. This shows the danger of blind extrapolation; the balloon would land and stop descending long before 6060 minutes.

Common mistakes

  • Assuming linear trends continue forever: Natural phenomena rarely grow or shrink at a constant rate forever. Always verify if a ceiling or floor naturally restricts the data.
  • Reversing xx and yy variables: Placing the predicted value in the wrong part of the formula causes incorrect results. The variable xx is normally the independent variable (like time), and yy is the dependent variable (like height or cost).
  • Confusing the concepts: Remember that interpolation is internal ("inter"), while extrapolation is external ("extra").

Frequently asked questions

Is extrapolation ever useful?

Yes. Despite its risks, extrapolation is essential for forecasting. Economists, meteorologists, and scientists extrapolate current trends to predict future sales, track weather paths, or estimate population growth.


Do these methods only work for straight lines?

No. While linear interpolation is the most common and simple method, more advanced mathematics can interpolate and extrapolate using curves, exponential functions, and polynomials.


How accurate is an interpolated estimate?

Interpolation is typically very accurate if the data points are close together and the overall trend is smooth. The wider the gap between the known points, the more room there is for the actual data to deviate from a straight-line estimate.

Practice questions

Question

A graph plotting sales data between day 5 and day 15. A point marked P is located at day 12. A point marked Q is located at day 18.


Based on the graph, which of the following statements is true?

  • Both P and Q represent interpolation estimates.

  • Point P represents interpolation, and Point Q represents extrapolation.

  • Point P represents extrapolation, and Point Q represents interpolation.

  • Both P and Q represent extrapolation estimates.

Answer:

Point P represents interpolation, and Point Q represents extrapolation.

Question

A researcher measures 1515 grams of a substance at 22 minutes and 3535 grams of the substance at 66 minutes. Assuming a linear relationship, what is the interpolated estimate at 55 minutes?

  • 25 grams25\text{ grams}

  • 30 grams30\text{ grams}

  • 35 grams35\text{ grams}

  • 40 grams40\text{ grams}

Answer:

30 grams30\text{ grams}

Question

A line graph with time in seconds on the x-axis and speed in meters per second on the y-axis. Known points are plotted at x equals 2, y equals 4 and x equals 6, y equals 12.

Using the graph, what is the linearly extrapolated speed at 88 seconds?

  • 12 m/s12\text{ m/s}

  • 16 m/s16\text{ m/s}

  • 18 m/s18\text{ m/s}

  • 20 m/s20\text{ m/s}

Answer:

16 m/s16\text{ m/s}

Question

Why is extrapolation generally considered less reliable than interpolation?

  • Extrapolation uses a completely different and more complex mathematical formula.

  • It only works when the observed data points have a negative correlation.

  • Interpolation is guaranteed to give exact, perfectly accurate real-world results.

  • The observed pattern or trend may change abruptly outside the known data limits.

Answer:

The observed pattern or trend may change abruptly outside the known data limits.

Question

A bank account balance is dropping at a constant linear rate. The balance is 500500 dollars in month 22 and 200200 dollars in month 55. If you extrapolate the balance to month 1010, which of the following best describes the result?

  • The calculation predicts exactly 00 dollars.

  • The calculation yields a mathematically impossible or highly unlikely negative balance.

  • The result is mathematically identical to an interpolation estimate.

  • The rate of change becomes positive because extrapolation reverses the line direction.

Answer:

The calculation yields a mathematically impossible or highly unlikely negative balance.