LOGEST function

From Apache OpenOffice Wiki
< Documentation‎ | How Tos
Revision as of 11:06, 30 January 2024 by DiGro (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Returns a table of statistics for an exponential curve that best fits a data set.


LOGEST(yvalues; xvalues; allow_const; stats)

yvalues is a single row or column range specifying the y coordinates in a set of data points.
xvalues is a corresponding single row or column range specifying the x coordinates. If xvalues is omitted it defaults to 1, 2, 3, ..., n. If there is more than one set of x variables, xvalues may be a range with corresponding multiple rows or columns.
LOGEST finds an exponential curve y = a . bx that best fits the data. With more than one set of variables the curve is of the form y = a . b1x1 . b2x2 ... . bnxn.
In order to fit the curve, LOGEST uses linear regression (the "least squares" method) based on the equation ln(y) = ln(a) + x1ln(b1) + x2ln(b2) + ... xnln(bn).
if allow_const is FALSE the constant a is forced to be one; y = bx. If omitted, allow_const defaults to TRUE (a value for a is found).
LOGEST returns a table (array) of statistics as below and must be entered as an array formula (for example by using  Cntrl  +  ⇧ Shift  +  ↵ Enter  rather than just  ↵ Enter )
If stats is omitted or FALSE only the top line of the statistics table is returned. If TRUE the entire table is returned. The statistics relate to the equation for ln(y) given above.

Calc linest output.png
b1 to bn and a are the coefficients for the equation above.
σ1 to σn are the standard error values for the ln(b) values; σa is the standard error value for the ln(a) value.
r2 is the determination coefficient (RSQ); σy is the standard error value for the ln(y) estimate.
F is the F statistic (F-observed value); df is the number of degrees of freedom.
ssreg is the regression sum of squares; ssresid is the residual sum of squares.


Calc logest example.png

In the example above, cells A2:B6 contain the x,y values for a set of points. LOGEST(B2:B6;A2:A6;1;1) returns the statistics for a best fit exponential curve through those points.


  • You need a good understanding of the statistics involved.
  • Any empty cells in the output array show #N/A (in Calc and Excel).

See Also
Personal tools