Skip to content

INTERCEPT

Returns the point where the best-fit straight line crosses the y axis: the predicted y when x is 0.

Syntax

=INTERCEPT(, )

Statistical

All versions of Excel, including Excel for Microsoft 365 and Excel for the web.

Try it

Edit the formula in B8 or change the inputs. The sheet recalculates as you type.

B8
A
B
C
1
Units
Total cost
2
100
2,600
3
200
3,100
4
300
3,500
5
400
4,100
6
500
4,600
7
8
Fixed cost
2,080
9

B8 =INTERCEPT(B2:B6,A2:A6) returns 2,080

How INTERCEPT works

INTERCEPT fits a straight line through your data using least squares and returns where it meets the vertical axis. In other words, it predicts y when x is zero. The line is y = intercept + slope × x, where SLOPE supplies the other half.

What the intercept means

Its meaning depends on the data.

  • Cost against volume. The intercept estimates the fixed cost: what you would pay at zero units. The slope is the variable cost per unit.
  • Sales against advertising. The intercept estimates the baseline sales with no advertising.
  • A trend over time. With period numbers as x, the intercept is the fitted value at period 0, one period before the first.

For total costs of 2,600, 3,100, 3,500, 4,100 and 4,600 at 100 to 500 units, =INTERCEPT(B2:B6, A2:A6) returns 2,080. That is the estimated fixed cost, and =SLOPE(B2:B6, A2:A6) returns 5, the variable cost per unit.

Argument order

Like SLOPE, INTERCEPT takes y first, then x: =INTERCEPT(known_ys, known_xs). Swapping them gives a different, wrong number without any error. Put the quantity you want to predict first.

Extrapolation warning

The intercept is often outside the range of your data. If every x value is between 100 and 500, the fitted line says what happens at 0, but you have no evidence the relationship holds there. A negative intercept for a quantity that cannot be negative, such as units sold, is a sign that the straight-line model only applies within the observed range. Treat it as a fitted constant, not as a measured fact.

Making predictions

To predict y for a particular x, combine the two parts: =INTERCEPT(B2:B6,A2:A6) + SLOPE(B2:B6,A2:A6) * 600. FORECAST.LINEAR does the same in one function. Use CORREL to check how well a straight line fits.

Errors

The two ranges must be the same size, or INTERCEPT returns #N/A. If every x value is identical, INTERCEPT returns #DIV/0!. Text, blanks and logical values in either range are dropped in pairs.

Arguments

known_ys
The dependent values, the ones you want to explain or predict, such as total cost in B2:B6. This comes first.
known_xs
The independent values, the ones that drive the change, such as units produced in A2:A6. It must hold the same number of values as known_ys.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Estimate a fixed cost

B8 =INTERCEPT(B2:B6,A2:A6)

Result: 2,080

The best-fit line has a slope of 5 per unit and meets the cost axis at 2,080, the estimated cost at zero units.

B8
A
B
C
1
Units
Total cost
2
100
2,600
3
200
3,100
4
300
3,500
5
400
4,100
6
500
4,600
7
8
Fixed cost
2,080
9

B8 =INTERCEPT(B2:B6,A2:A6) returns 2,080

Example 2

Baseline sales with no advertising

B8 =INTERCEPT(C2:C6,B2:B6)

Result: 92

Sales is y and ad spend is x. The fitted line gives 92 at zero ad spend. Ad spend never fell below 10 in this data, so treat it as an estimate.

B8
A
B
C
1
Month
Ad spend (k)
Sales (k)
2
Jan
10
120
3
Feb
20
150
4
Mar
30
170
5
Apr
40
210
6
May
50
230
7
8
Baseline sales
92
9

B8 =INTERCEPT(C2:C6,B2:B6) returns 92

Example 3

Predict with the intercept and slope

B9 =INTERCEPT(B2:B6,A2:A6)+SLOPE(B2:B6,A2:A6)*B8

Result: 5,080

The fixed cost of 2,080 plus 5 per unit for 600 units gives 5,080.

B9
A
B
C
1
Units
Total cost
2
100
2,600
3
200
3,100
4
300
3,500
5
400
4,100
6
500
4,600
7
8
Planned units
600
9
Predicted cost
5,080
10

B9 =INTERCEPT(B2:B6,A2:A6)+SLOPE(B2:B6,A2:A6)*B8 returns 5,080

Example 4

No variation in x

B6 =INTERCEPT(B2:B4,A2:A4)

Result: #DIV/0!

All three x values are 300, so there is no slope to fit and no intercept to find.

B6
A
B
C
1
Units
Total cost
2
300
3400
3
300
3500
4
300
3600
5
6
Intercept
#DIV/0!
7
8

B6 =INTERCEPT(B2:B4,A2:A4) returns #DIV/0!

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B8, return the base cost: the maintenance cost on the best-fit line at zero machine hours.

Answer in B8.

B8
A
B
C
1
Machine hours
Maintenance cost
2
2
15
3
4
21
4
6
30
5
8
33
6
10
41
7
8
Base cost
9
Planned hours
12
10
Predicted cost
11

Common mistakes

  • The order is y first, then x: INTERCEPT(known_ys, known_xs). Swapping them returns a different number with no error.
  • The intercept is usually outside your data range, so it is an extrapolation. A negative intercept for something that cannot be negative is a warning, not a result to report.
  • The two ranges must be the same size, or INTERCEPT returns #N/A.
  • If every x value is the same, INTERCEPT returns #DIV/0!.
  • Text, blanks and logical values are dropped in pairs. Numbers stored as text are skipped without warning.
  • When x is a date, the intercept is the fitted value at date 0 (the year 1900), which is meaningless. Use days since the first date as x instead.

Questions people ask

Which argument comes first in INTERCEPT?

The y values, the ones you want to predict. `=INTERCEPT(costs, units)` returns the cost at zero units.

What does the intercept mean in a cost model?

It is the estimated fixed cost: the cost the best-fit line gives at zero volume. The slope is the variable cost per unit.

Why is my intercept negative?

The fitted line crosses the y axis below zero, which can happen when the real relationship is not a straight line from zero. Only use the line inside the range of your data.

How do I predict a value using INTERCEPT?

Add the intercept to the slope times the new x: `=INTERCEPT(B2:B6,A2:A6)+SLOPE(B2:B6,A2:A6)*600`, or use FORECAST.LINEAR.

Learn INTERCEPT in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.