Get parameters of linear trend
=LINEST(known_ys, [known_xs], [const], [stats])
| Parameter | Description |
|---|---|
known_ys |
An array or range of dependent y values. |
known_xs |
[optional] An array or range of independent x values. |
const |
[optional] Boolean - normal or force the constant b to equal 0. Default is TRUE = normal calculation. |
stats |
[optional] Boolean - return additional statistics. Default is FALSE = slope and intercept only. |
By default, LINEST returns just two statistics, slope and intercept. For example:
=LINEST({1.8;5.3;8.2;12;13.5},{1;3;5;7;8}) // default
returns a 1 row by 2 column array like this:
{1.6726,0.1317}
Setting the stats argument to TRUE or 1 will cause LINEST to return all 10 statistics:
=LINEST({1.8;5.3;8.2;12;13.5},{1;3;5;7;8},TRUE,TRUE) // more stats
The result is an array with 5 rows and 2 columns:
{1.6726,0.1317;
0.0371,0.2017;
0.9985,0.2124;
2034.443,3;
91.7567,0.1353}