Leading the way in Microsoft Office Development
 Home|Excel|Word|PowerPoint|Consultancy|Feedback|Contact 
 Microsoft Excel > Functions > Statistical > LINEST

 

LINEST(known_y's [,known_x's] [,const] [,stats])

 
 Returns the coordinates for a straight line that best fits your data.

 known_y'sThe set of y-values for the equation (y = mx + b).
 known_x'sThe set of x-values for the equation (y = mx + b).
 constTrue or False to specify whether the constant b is to equal 0.
 statsTrue or False to specify whether to return additional regression statistics.

 REMARKS
 
  • This function always returns an array.
     
  • This function must be entered as an array formula.
     
  • Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and returns an array that describes the line.
     
  • If "known_y's" is in a single column, then each column of "known_x's" is interpreted as a separate variable.
     
  • If "known_y's" is in a single row, then each row of "known_x's" is interpreted as a separate variable.
     
  • The "known_x's" can include one or more sets of variables.
     
  • If "known_x's" is left blank, it is assumed to be the array {1,2,3,...} that is the same size as "known_y's".
     
  • If "const" = True, then b is calculated normally.
     
  • If "const" = False, then b = 0 and the equation (y = mx) is used.
     
  • If "const" is left blank, then True is used.
     
  • If "stats" = True, then additional regression statistics are returned (i.e. the array is {mn,mn-1,...,m1,b;sen,sen-1,...,se1,seb;r2,sey;F,df;ssreg,ssresid} ).
     
  • If "stats" = False, then only the m-coefficients and the constant b are returned.
     
  • If "stats" is left blank, then False is used.
     
  • If only one variable is used, "known_y's" and "known_x's" can be ranges of any shape, as long as they have equal dimensions.
     
  • If more than one variable is used, "known_y's" must be a vector (that is, a range with a height of one row or a width of one column).
     
  • The accuracy of this function was improved in Excel 2003. For more information please refer to this Knowledge Base Article (828533).
     
  • For a working example please refer to the LINEST Function page.

     EXAMPLES
     
     A
    1{=LINEST({1,9,5,7},{0,4,2,3})} = {1,2}
     

     Functions - L | Index - L | Office Online 

     Copyright © 2004-2007 Better Solutions Limited. All Rights Reserved.Top