Category: FUNCTION | Updated: 2026-11-22
How to Use the INTERCEPT Function in Google Sheets | Calculate the Y-Intercept of a Linear Regression Line
Syntax
=INTERCEPT(data_y, data_x)
- data_y: Specifies the cell range for the dependent data (Y-axis values).
- data_x: Specifies the cell range for the independent data (X-axis values).
Practical Table Example
This example calculates the “predicted score when study time is 0 hours (intercept)” from study time (A2:A6) and test score (B2:B6) data.
| Cell | A (Study Time) | B (Test Score) | C (Calculation Item) | D (Formula) | E (Result) |
|---|---|---|---|---|---|
| 1 | Study Time | Score | Item | Formula | Result |
| 2 | 2 | 55 | Regression Line Intercept | =INTERCEPT(B2:B6, A2:A6) |
41.8 |
| 3 | 4 | 68 | |||
| 4 | 6 | 80 | |||
| 5 | 8 | 94 | |||
| 6 | 10 | 107 |
The intercept is calculated as 41.8, showing that the baseline score for 0 hours of study time is approximately 41.8 points.
Common Errors and Precautions
- Watch out for unrealistic values: Because the intercept simply extends the line to where it crosses X=0, if X=0 is far outside your data range, it may return an unrealistic value such as a negative number.
#N/Aerror: Occurs whendata_yanddata_xhave different range sizes.#DIV/0!error: Occurs when there are fewer than 2 valid data pairs, or when the variance ofdata_xis0.
Frequently Asked Questions
Q. How is the 'intercept' calculated by the INTERCEPT function useful in practice?
A. It corresponds to 'b' in the regression line (y = mx + b) and lets you understand the baseline value when X=0. For example, you can estimate how much monthly sales you can expect from organic traffic even when ad spend is 0 yen.
Q. What can you calculate by combining the SLOPE and INTERCEPT functions?
A. By writing '=SLOPE(Y, X) * new_X + INTERCEPT(Y, X)', you can manually calculate the exact same linear forecast value as the FORECAST.LINEAR function.