In this article, we delve into the intricacies of the LINEST function, one of Excel's statistical tools highly favored for its robustness.

Description: The function returns an array describing a straight line using the method of least squares.
Syntax: LINEST(known_y's, [known_x's], [const], [stats])
Here's the breakdown:
- known_y's: The known y-values in the relationship y = bm^x, which is a required parameter.
+ If known_y's are in a single column or row -> each column or row of known_y's is understood as a separate variable.
- known_x's: The known x-values in the relationship y = bm^x, which is an optional parameter.
+ known_x's can encompass one or multiple sets of variables.
+ If known_x's are omitted -> it is assumed to be an array of the same size as known_y's.
- const: A logical value determining the value of constant term b, an optional parameter with the following values:
+ const = True or omitted -> b is computed as usual.
+ const = False or omitted -> b = 1 and m is adjusted such that: y = m^x.
- stats: A logical value determining the type of additional regression statistics returned, including values like {mn,mn-1,...,m1,b;sen,sen-1,...,se1,seb;r2,sey;F,df;ssreg,ssresid}.
Note:
- Any straight line can be described by its slope and y-intercept:
+ Slope (m):
To find the slope of a line m, take two points on that line, (x1,y1) and (x2,y2) -> the slope is (y2 - y1)/(x2 - x1).
+ Y-Intercept (b):
The y-intercept of a line b, is the value of y at the point where the line intersects the y-axis.
The equation of the line is y = mx + b. Any point on the line can be calculated by inputting the value of y or x into this equation.
- When there's only one independent variable -> use the formula:
+ Slope:
=INDEX(LINEST(known_y's,known_x's),1)
+ Y-Intercept:
=INDEX(LINEST(known_y's,known_x's),2)
+ Use commas to separate values within the same row.
+ Use semicolons to separate rows from each other.
- When there are multiple independent variables x -> use the formula:
m=∑(x−
b=¯¯¯y−m¯¯¯x
Where: x = AVERAGE(known x's) and y = AVERAGE(known_y's).
Example:
Calculate the slope and y-intercept of the line corresponding to the x, y values in the data table below:

- Calculate the slope m of the line corresponding to the x, y values. In the cell to compute, enter the formula: =LINEST(C6:C10,D6:D10,FALSE)

- Press Enter -> the slope m of the line corresponding to the x, y values is:

- Calculate the y-intercept of the line corresponding to the x, y values. In the cell to compute, enter the formula: =LINEST(C6:C10,D6:D 10,TRUE)

- Press Enter -> the y-intercept of the line corresponding to the x, y values is:

Here is the guide and some specific examples when using the LINEST function in Excel.
Wishing you success!