INTERCEPT function

INTERCEPT finds where a linear regression line crosses the y-axis, revealing the trend's mathematical starting point.

=INTERCEPT(known_ys, known_xs)

Generate a INTERCEPT formula

Describe what you need. The generator will reach for INTERCEPT where INTERCEPT is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How INTERCEPT reads its arguments
known_ysrequiredknown_xsrequiredINTERCEPT
ArgumentRequiredDescription
known_ysRequiredAn array of dependent variable values (y-coordinates); must contain only numbers and match the length of known_xs.
known_xsRequiredAn array of independent variable values (x-coordinates); must contain only numbers and match the length of known_ys.

Returns

A decimal number representing the y-intercept value of the best-fit line.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Predict when tomatoes will run out based on daily usage

DayTomatoes (kg)Olive Oil (L)Basil (bunches)Mozzarella (kg)
1602010030
25419.59529.5
348198829
44218.58028.5
536187528
63017.56827.5
=INTERCEPT(B2:B7, A2:A7)

Result: 66

INTERCEPT calculates the y-intercept for tomatoes consumption (column B vs column A). The result of 66 kg represents where the best-fit line crosses the y-axis—in other words, if you extended the consumption trend backward to day zero, you'd have started with 66 kg. The steady decline of 6 kg per day means stock runs out around day 11. This helps predict when to reorder.

2. Establish baseline olive oil usage to optimize supplier orders

DayTomatoes (kg)Olive Oil (L)Basil (bunches)Mozzarella (kg)
1602010030
25419.59529.5
348198829
44218.58028.5
536187528
63017.56827.5
=INTERCEPT(C2:C7, A2:A7)

Result: 20.5

Applying INTERCEPT to olive oil (column C) returns 20.5 L—the mathematical starting point of the consumption trend. With consumption declining at 0.5 L per day, the intercept shows that day zero would have 20.5 L on hand. This reveals your steady-state consumption rate and helps set par levels for inventory. Comparing this to actual starting stock shows whether you're overstocking or running lean.

3. Compare ingredient depletion rates to prioritize deliveries

DayTomatoes (kg)Olive Oil (L)Basil (bunches)Mozzarella (kg)
1602010030
25419.59529.5
348198829
44218.58028.5
536187528
63017.56827.5
=INTERCEPT(E2:E7, A2:A7)

Result: 30.5

For mozzarella (column E), INTERCEPT returns 30.5 kg. Comparing intercepts across all ingredients (tomatoes: 66, olive oil: 20.5, mozzarella: 30.5) reveals which ingredients deplete fastest relative to their initial stock. Tomatoes drop 6 kg daily while mozzarella drops only 0.5 kg daily. This insight helps allocate delivery schedules and supplier agreements—high-turnover items like tomatoes need more frequent orders or larger quantities.

Common errors

Which INTERCEPT error are you seeing?
INTERCEPT returned an error#VALUE!
Verify that known_ys and known_xs reference only numeric columns. If data includes headers, exclude row 1 from your range. If a column has mixed types (some numbers, some text), clean it or select a different column.
#DIV/0!
Ensure known_ys and known_xs have identical lengths and span at least two rows (e.g., A2:A7 paired with B2:B7). Check for mismatched range references like A2:A7 and B2:B8.
#NUM!
Verify that known_xs contains different values across its range. If all x values are the same (e.g., all cells = 5), pick a different column for the independent variable or review your data source.
ErrorWhy it happensHow to fix it
#VALUE!One or both arrays contain text, dates, or other non-numeric values. INTERCEPT requires pure numbers to calculate regression coefficients.Verify that known_ys and known_xs reference only numeric columns. If data includes headers, exclude row 1 from your range. If a column has mixed types (some numbers, some text), clean it or select a different column.
#DIV/0!The two arrays have different lengths, or one array contains fewer than two cells. Regression math requires at least two paired (x, y) points.Ensure known_ys and known_xs have identical lengths and span at least two rows (e.g., A2:A7 paired with B2:B7). Check for mismatched range references like A2:A7 and B2:B8.
#NUM!All values in known_xs are identical. When the x-values don't vary, the slope is undefined and the regression line cannot be calculated.Verify that known_xs contains different values across its range. If all x values are the same (e.g., all cells = 5), pick a different column for the independent variable or review your data source.

Tips and when to use something else

  • INTERCEPT assumes a linear relationship between your variables. Always plot your data as a scatter chart first to confirm the pattern is roughly straight, not curved or randomly scattered.
  • Outliers and errors heavily skew the intercept. Clean your dataset by investigating unexpected values before running INTERCEPT—one bad data point can shift the intercept significantly.
  • INTERCEPT and SLOPE work as a pair: INTERCEPT gives the y-intercept (b), SLOPE gives the steepness (m). Together they form the regression equation y = m*x + b, which you can use for forecasting beyond your data range.
  • If your data shows exponential growth or decay (like bacterial cultures or radioactive decay), use LOGEST instead of INTERCEPT; if it's polynomial or power-law, use LINEST instead.

Frequently asked questions

What's the difference between INTERCEPT and SLOPE?
INTERCEPT returns the y-value where the regression line crosses the y-axis (at x=0). SLOPE returns the line's steepness (how much y changes per unit of x). Together they define the complete line: y = SLOPE × x + INTERCEPT. You need both to make predictions.
Why does INTERCEPT return a value that doesn't exist in my data?
INTERCEPT calculates where the best-fit line would cross the y-axis mathematically, not where your actual data is. The intercept is often a theoretical point; its value depends on the trend's slope and position, not the observed data range.
Can INTERCEPT work with only two data points?
Yes, but it's meaningless. With two points, any regression line passes perfectly through both, so there's no trend to analyze—you're just defining a line through two points. Use at least 3–4 points for INTERCEPT to reveal a meaningful pattern.
When should I use INTERCEPT instead of just taking my first value?
Use INTERCEPT for forecasting and trend analysis (e.g., 'when will stock run out?'). Use your actual first value if you want the real, observed starting point. INTERCEPT is a mathematical extrapolation; it doesn't describe what you actually have—it describes what the trend implies you'd have at x=0.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17