Name

LINEST

Synopsis

Use LINEST to use the least squares method to find the best-fitting straight line that meets the specified data values. This function returns an array of values that describe the line and, therefore, it must be specified as an array formula. The function uses the equation y=mx + b for a line with one value specified for the Known_X's arguments, or the equation y=m1x1 + m2x2 + ... + b for multiple values.

To Calculate

=LINEST(Known_Y's, Known_X's, Const, Stats)

The Known_Y's argument is required for this function. All other arguments are optional.

Known_Y's

This array must contain a series of positive numbers. If the values in the array are in a single column, then the function interprets the values in each column of the Known_X's as a separate variable. If the values in the array are in a single row, then the function interprets the values in each row of the Known_X's array as a separate variable.

Known_X's

If this argument is omitted, it is assumed to be an array of values in the range of {1,2,3,...} that is the same size as the array specified by the Known_Y's argument.

Stats

Indicates a logical value of TRUE or FALSE that specifies whether additional regression statistics should be returned with the array. If the value is TRUE, the function returns additional regression statistics.

Example

Figure 15-26 compares the use of the LINEST and LOGEST functions. The LINEST function returns statistics for the specified line whereas, LOGEST returns values for an exponential ...

Get Excel 2000 in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.