Practice free

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.

Practice this in the app

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.

FormulaExcel showsCase
=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.

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 .