Formualizer Docs

INTERCEPT

Returns the y-intercept of the linear regression line for paired data.

INTERCEPT fits y = m*x + b and returns b, the predicted y when x = 0.

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=INTERCEPT(known_ys, known_xs)

Arguments

ArgumentTypeRequiredDefault
known_ysnumber (range)Required—
known_xsnumber (range)Required—

Remarks

  • known_y and known_x must have the same numeric length.

Error cases

  • Returns #N/A for mismatched lengths.
  • Returns #DIV/0! if all x values are identical.

Examples

Describe a linear fit between paired x and y observations.

Formula =INTERCEPT({2,5,6,9},{1,2,3,4})

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Reverse the order of the y series while leaving x unchanged.

Formula =INTERCEPT({9,6,5,2},{1,2,3,4})

Expected result 11

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Evaluate a series whose observations lie exactly on a line.

Formula =INTERCEPT({2,4,6},{1,2,3})

Expected result 0

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The known x and y series must contain corresponding observations.

Formula =INTERCEPT({2,5,6,9},{1,2,3})

Expected result #N/A

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Positive intercept from direct arrays

Formula =INTERCEPT({3,5,7},{1,2,3})

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Intercept from range-based linear trend

Formula =INTERCEPT(A1:A3,B1:B3)

Input cells
AB
1101
282
363

Expected result 12

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Implementation

Engine source

On this page