EXCEL LINEST FUNCTION

The Excel LINEST function delivers statistical information on the line of best fit based on a set of x- and y-values given.
The primary statistical information supplied is an array of constants, mn, mn-1,…, b for the equation: y = m1x1 + m2x2 +… + b, or the function returns the variables m and b for the linear equation: y = mx + b for a specific range of x values.
The user can additionally request that the function return extra regression statistics.

Syntax :

=LINEST( known_y’s[known_x’s][const][stats] )

Parameters :

  • The following parameter are:

known y’s –

  • A collection of known y-values.
    [known x’s] –
  • An optional parameter that returns an array containing one or more sets of known x-values.
    If supplied, the [known x’s] array should be the same length as that of the known y’s array; if not provided, the [known x’s] array defaults to 1, 2, 3,…

[const] –

  • A persuasion that specifies how the constant ‘b’ is handled in the equation y = m1x1 + m2x2 +… + b.
    This parameter can be TRUE or FALSE, which means that:
  • TRUE (or omitted) – the constant b is processed normally;
  • FALSE – the constant b is assigned to the value 0.

[stats] –

  • An optional logical parameter that defines whether the function should return extra regression statistics on the line of best fit.
    This parameter can be TRUE or FALSE, which means:
  • FALSE (or omitted) – if more regression statistics are not returned.
    That is, just return the array of values mn, mn-1,…, b.
  • TRUE – Additional regression statistics ARE RETURNED.
    In other words, return the array of values mn, mn-1,…, b as well as the extra regression statistics specified in the table below.

Step By Step Guide of LINEST Function

Example :

The spreadsheet below has three separate sets of independent variables (known x values) in cells A2-A11, B2-B11, and C2-C11, and columns D2-D11 have the related known y-values. The spreadsheet’s cells F1-H3 display the results of the Excel Linest function, which was used to produce statistical information on the line of best fit across these points.

  • #REF! – This error occurs when the array of [known x’s] is not the same length as the array of known y’s.
  • #VALUE! – Occurs if any of the variables in the given [known x’s] or known y’s arrays are non-numeric (this includes text versions of numbers, which the Linest function does not recognise as numerals).

Related Functions

HLOOKUP Function

HLOOKUP Function

Explore Now

VLOOKUP Function

VLOOKUP Function

Explore Now

INDEX Function

INDEX Function

Explore Now

MATCH Function

MATCH Function

Explore Now

DATE Function

DATE Function

Explore Now

IF Function

IF Function

Explore Now

OR Function

OR Function

Explore Now

AND Function

AND Function

Explore Now

RANK Function

RANK Function

Explore Now

SUMIF Function

SUMIF Function

Explore Now

XIRR Function

XIRR Function

Explore Now

WORKDAYS Function

WORKDAYS Function

Explore Now