LINEST Function in Google Sheets

Perform linear regression analysis using the LINEST function.

LINEST Function

The LINEST function in Google Sheets performs linear regression analysis on a dataset.

Syntax

LINEST(known_data_y, [known_data_x], [calculate_b], [verbose])
  • known_data_y: The dependent data for regression.
  • known_data_x: The independent data (optional).
  • calculate_b: A logical value to calculate the y-intercept (optional).
  • verbose: A logical value to return additional regression statistics (optional).

Examples

  1. Basic Example

Perform linear regression on data in A1:A10 with independent data in B1:B10:

=LINEST(A1:A10, B1:B10)

Notes

  • Returns regression statistics including slope and intercept.
  • TREND: Calculate linear trends.