Skip to content
Excel

LINEST function in Excel

Returns the parameters of a linear trend

=LINEST(known_y's, [known_x's], [const], [stats])

LINEST syntax and parameters

Four arguments, one required.

  • known_y'sanyRequired
  • known_x'sanyOptional
  • constanyOptional
  • statsanyOptional

LINEST examples

Formulas you'll actually reuse.

  1. Slope and intercept of monthly revenue against month number:

    =LINEST(B2:B13, A2:A13)

    Result{412.5, 8120}

  2. Project month 13 from the fitted line:

    =INDEX(LINEST(B2:B13, A2:A13), 1, 1) * 13 + INDEX(LINEST(B2:B13, A2:A13), 1, 2)

    Result13482.5

LINEST in Google Sheets

Same name — your formula ports as-is.

Try LINEST in the playground

Edit the example — nothing to install.

Preloaded with the LINEST formula from Example 1 — change anything and watch it respond.

Loading the editor…

LINEST errors

What they mean — and the fixes.

  • #REF!

    known_data_y and known_data_x have different lengths — both ranges must cover the same number of points.