LINEST
Returns the slope and intercept of the least-squares line, and optionally its regression statistics.
Syntax
=LINEST(, , , )
Statistical
All versions of Excel
A full guide with worked examples for LINEST is still being written.
Arguments
- known_ys
- The known y values.
- known_xsoptional
- The known x values, the same size as known_ys. Omitted, 1, 2, 3 and so on.
- constoptional
- TRUE or omitted fits an intercept; FALSE forces the line through zero.
- statsoptional
- TRUE adds four rows of statistics; FALSE or omitted returns only the slope and intercept.
Try it
Type some values, then a formula that uses LINEST, and press Enter. The sheet calculates as Excel would.
A
B
C
D
E
F
1
2
3
4
5
6
7
8
9
10