Chiudi
Chiudi
Chiudi

# LINEST Function

The LINEST function is one of the statistical functions. It is used to calculate the statistics for a line by using the least squares method to calculate a straight line that best fits your data, and then returns an array that describes the line; because this function returns an array of values, it must be entered as an array formula.

### Syntax

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

The LINEST function has the following argument:

Argument Description
known_y's A known range of y values in the equation y = mx + b. This is the required argument.
known_x's A known range of x values in the equation y = mx + b. This is an optional argument. If it is omitted, known_x's is assumed to be the array {1,2,3,...} with the same number of values as known_y's.
const A logical value that specifies if you want to set b equal to 0. This is an optional argument. If it is set to TRUE or omitted, b is calculated normally. If it is set to FALSE, b is set equal to 0.
stats A logical value that specifies if you want to return additional regression statistics. This is an optional argument. If it is set to TRUE, the function returns the additional regression statistics. If it is set to FALSE or omitted, the function does not return the additional regression statistics.