Note: The other languages of the website are Google-translated. Back to English

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

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

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, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL