INTERCEPT function
INTERCEPT returns the y value where the least-squares line through your data crosses the y axis, at x equal to 0. Pair it with SLOPE to write the line equation.
Example
Read it as a sentence: fit a straight line through the pairs in F1:F5 and G1:G5 and find where it crosses the vertical axis, which gives 2.2.
Excel shows 2.2
F
G
1
1
2
2
2
4
3
3
5
4
4
4
5
5
5
Data
Syntax
INTERCEPT(known_y's, known_x's)
-
known_y's(required) - Dependent values.
-
known_x's(required) - Independent values.
Returns: Where the best-fit line crosses the y axis.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=INTERCEPT({2,4,5,4,5},{1,2,3,4,5}) | 2.2 | Array constants |
=INTERCEPT(Data!G1:G5,Data!F1:F5) | 2.2 | Two ranges (y,x order as written) |
=INTERCEPT(Data!I1:I5,Data!H1:H5) | 1.75 | Blank and text-number pairs dropped |
=INTERCEPT(Data!G1:G2,Data!F1:F2) | 0 | Two pairs |
=INTERCEPT({2,4,5,4,5},Data!F1:F5) | 2.2 | Row vs column same count |
=INTERCEPT(Data!G1:G5,Data!K1:K3) | #N/A | Different sizes |
=INTERCEPT(Data!G1:G5,Data!J1:J5) | #DIV/0! | Constant x |
=INTERCEPT(Data!C1:C5,Data!F1:F5) | #N/A | Range containing #N/A |
The Data sheet these formulas read
A cell that starts with = holds that formula.
C
F
G
H
I
J
K
1
1
1
2
1
2
3
1
2
2
2
4
4
3
2
3
=NA()
3
5
3
5
3
3
4
4
4
4
4
4
3
5
5
5
5
5
5
3
Data
Watch out for
- y values come first.
- Both ranges must be the same size.
Where it works
- Excel
- INTERCEPT is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .