Skip to main content

Excel LINEST Function

doc workday.intl function 1

If you want to follow along with this tutorial, please download the example spreadsheet.

doc workday.intl function 1

Description

The Excel LINEST function returns the statistic for a best fit straight line based on the supplied set of x value and y value by using the “least squares” method. The function returns an array of constant values.

The equation for the line is

y = mx + b

where

x is the independent variable;

y is the dependent variable;

m is the slope (gradient) of the line;

b is a constant, equal to the value of y when x = 0

or

y = m1x1+m2x2+…+b

where

the x's are the independent variable ranges;

y is the dependent variable;

the m's are constant multipliers for each x range;

b is a constant.

Syntax and arguments

Formula syntax

LINEST(known_ys, [known_xs], [const],[stats])

Arguments

  • Known_ys: Required, an array of known y values.
  • Known_xs: Optional, an array of one or more sets of known x values.
    --If provided, the array length of known_xs should be the same asknown_ys.
    --If omitted, takes the known_xs array on default value {1,2,3,…}.
  • Const: Optional, a logical argument that determines how the constant “b” is treated in the equation y = m1x1+m2x2+…+b
    --If it is TRUE, the constant “b” is treated normally.
    --If it is FALSE, the constant “b” is 0 (zero), and the equation is adjusted to y = mx.
  • Stats: Optional, a logical argument that determines whether to return additional regression statistics.
    --If it is FALSE or omitted, the function just returns the array of values {mn,mn-1,…m1,b}.
    --If it is TRUE, the function returns additional regression statistics {mn,mn-1,...,m1,b;sen,sen-1,...,se1,seb;r2,sey;F,df;ssreg,ssresid}, which list in the table below:
  • Statistic Description
    mn,mn-1,…m1 The array of constant multipliers for the straight line equation
    b The constant value of y when x=0
    sen,sen-1,...,se1 The standard error values for the coefficients m1,m2,...,mn
    seb The standard error value for the constant b (seb = #N/A when const is FALSE)
    r2 The coefficient of determination
    sey The standard error for the y estimate
    f F statistic (F-observed value)
    df Degrees of freedom
    ssreg Regression sum of squares
    ssresid Residual sum of squares

Return Value

The LINEST function returns an array of values.

Remark

The LINEST function returns an array, you must enter it as a multi-cell array formula and press CTRL + Shift + Enter keys to get the results.

Version

Excel 2003 or later

Usage and Examples

Example 1: for one set of known_xs, and ignore const and stats

In the list B4:B8, contains the known_xs, in the list C4:C8, contains the know_ys, now select cells E4:F4, then type below formula to the formula bar:

=LINEST(C4:C8,B4:B8)

Press Ctrl + Shift + Enter key, the array of results gets out.

doc workday.intl function 1

Example 2: for two or more sets of known_xs and const and stats are TRUEs

In the list B11:D15, contains the known_xs, in the list E11:E15, contains the know_ys, const and stats are TRUEs, select range G11:J15, then type below formula to the formula bar:

=LINEST(E11:E15,B11:D15,TRUE,TRUE)

Press Ctrl + Shift + Enter key, the array of results gets out.

doc workday.intl function 1


Relative Functions:

  • Excel ROUNDOWN Function
    The ROUNDDOWN function rounds a number down (toward zero) to a specified number of digits.


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Description


Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Witam, dlaczego funkcja w przykladzie nr 2 wyrzuca N/A?
This comment was minimized by the moderator on the site
Hi, martha, #N/A is the error value that means "no value is available."
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations