


Slope (m): To find the slope of a line, often represented as m: – For a line with two points (x1, y1) and (x2, y2) the slope is calculated as m = (y2 – y1) / (x2 – x1).We can describe a straight line with slope and y-intercept:.Y-intercept: =INDEX (LINEST (known_y’s, known_x’s),2).Slope: =INDEX (LINEST (known_y’s, known_x’s),1).When there’s only one independent x-variable, slope and y-intercept values can directly be calculated by using the following formulas:.Formulas that return arrays must be entered as array formulas.The y-values predicted by the regression equation may not be valid if they are outside the range of the y-values used to determine the equation.Separator characters may vary depending on native regional settings. When entering an array constant (known_x’s) as an argument, we can use commas to separate values in the same row and semicolons to separate the rows.So, based on the six-month sales data, sales data for the 9th month is to be estimated.

Each instance covers a different use case implemented using the LINEST function in Excel.Īs shown in the above LINEST formula in Excel, A1:A6 is the month number, and B2:B6 indicates the corresponding sales figures. You can refer to a couple of examples given below to know more. As a WS function, the LINEST function in Excel can be entered as a part of the formula in a worksheet cell. The said function is a Worksheet (WS) function. If stats are FALSE or skipped, LINEST in Excel returns only the m-coefficients and the constant b.If stats is TRUE, LINEST in excel returns the additional regression statistics as a result, the returned array is .stats = It is an optional parameter and represents a logical value (TRUE/FALSE) specifying whether to return additional regression statistics.If const is FALSE, b is set equal to 0, and the m-values are adjusted to fit y = mx.If const is TRUE or skipped, b is calculated normally.const = It is an optional parameter and represents a logical value (TRUE/FALSE) specifying whether to force the constant b to be equal to 0.If more than one variable is used, known_y’s must be a vector (i.e., a range with a height of one row or width of one column).If only one variable is used, known_y’s and known_x’s can be the ranges of any shape with equal dimensions. The range of known_x’s can have one or more sets of variables.known_x’s = It is an optional parameter and indicates the set of x-values already known in the relationship y = mx + b.Likewise, if the range of known_y’s is in a single row, each row of known_x’s is interpreted as a different variable.If the range of known_y’s is in a single column, each column of known_x’s is interpreted as a separate variable.known_y’s = It is a required parameter and indicates the set of y-values already known in the relationship y = mx + b.
