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 =INTERCEPT(B2:B6,A2:A6) returns 2,080
Returns the point where the best-fit straight line crosses the y axis: the predicted y when x is 0.
Syntax
=INTERCEPT(, )
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 =INTERCEPT(B2:B6,A2:A6) returns 2,080
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.
Its meaning depends on the data.
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.
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.
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.
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.
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.
B2:B6. This comes first.A2:A6. It must hold the same number of values as known_ys.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
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 =INTERCEPT(B2:B6,A2:A6) returns 2,080
Example 2
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 =INTERCEPT(C2:C6,B2:B6) returns 92
Example 3
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 =INTERCEPT(B2:B6,A2:A6)+SLOPE(B2:B6,A2:A6)*B8 returns 5,080
Example 4
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 =INTERCEPT(B2:B4,A2:A4) returns #DIV/0!
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.
INTERCEPT(known_ys, known_xs). Swapping them returns a different number with no error.#N/A.#DIV/0!.The y values, the ones you want to predict. `=INTERCEPT(costs, units)` returns the cost at zero units.
It is the estimated fixed cost: the cost the best-fit line gives at zero volume. The slope is the variable cost per unit.
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.
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.
Tracks take you from the basics to modelling, one graded exercise at a time.