- SpreadJS Overview
- Getting Started
- JavaScript Frameworks
- Best Practices
- Features
- SpreadJS Designer
- SpreadJS Designer Component
- SpreadJS Collaboration Server
- Touch Support
-
Formula Reference
- Formula Overview
-
Formula Functions
- Barcode Functions
- Compatibility Functions
- Database Functions
- Date and Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Logical Functions
- Lookup and Reference Functions
- Math and Trigonometric Functions
-
Statistical Functions
- AVEDEV
- AVERAGE
- AVERAGEA
- AVERAGEIF
- AVERAGEIFS
- BETA.DIST
- BETA.INV
- BINOM.DIST
- BINOM.DIST.RANGE
- BINOM.INV
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CHISQ.TEST
- CONFIDENCE.NORM
- CONFIDENCE.T
- CORREL
- COUNT
- COUNTA
- COUNTBLANK
- COUNTIF
- COUNTIFS
- COVARIANCE.P
- COVARIANCE.S
- DEVSQ
- EXPON.DIST
- F.DIST
- F.DIST.RT
- F.INV
- F.INV.RT
- F.TEST
- FINV
- FISHER
- FISHERINV
- FORECAST
- FREQUENCY
- GAMMA
- GAMMA.DIST
- GAMMA.INV
- GAMMALN
- GAMMALN.PRECISE
- GAUSS
- GEOMEAN
- GROUPBY
- GROWTH
- HARMEAN
- HYPGEOM.DIST
- INTERCEPT
- KURT
- LARGE
- LINEST
- LOGEST
- LOGNORM.DIST
- LOGNORM.INV
- MAX
- MAXA
- MAXIFS
- MEDIAN
- MIN
- MINA
- MINIFS
- MODE.MULT
- MODE.SNGL
- NEGBINOM.DIST
- NORM.DIST
- NORM.S.DIST
- NORM.S.INV
- NORMINV
- PEARSON
- PERCENTOF
- PERCENTILE.EXC
- PERCENTILE.INC
- PERCENTRANK.EXC
- PERCENTRANK.INC
- PERMUT
- PERMUTATIONA
- PHI
- PIVOTBY
- POISSON.DIST
- PROB
- QUARTILE.EXC
- QUARTILE.INC
- RANK.AVG
- RANK.EQ
- RSQ
- SKEW
- SKEW.P
- SLOPE
- SMALL
- STANDARDIZE
- STDEV.P
- STDEV.S
- STDEVA
- STDEVPA
- STEYX
- T.DIST
- T.DIST.2T
- T.DIST.RT
- T.INV
- T.INV.2T
- T.TEST
- TREND
- TRIMMEAN
- VAR.P
- VAR.S
- VARA
- VARPA
- WEIBULL.DIST
- Z.TEST
- Sparkline Functions
- Text Functions
- Web Functions
- RegEx Functions
- Other Functions
- Import and Export Reference
- Frequently Used Events
- API Documentation
- Release Notes
LINEST
This function calculates the statistics for a line.
Syntax
LINEST(y, x, constant, stats)
Arguments
The equation for the line is y=mx+b or y=m1x1+m2x2+...+b.
This function has these arguments:
Argument | Description |
|---|---|
y | Set of y values that are known in the relationship y=mx+b |
x | (Optional) X is an optional set of x values that may be known in the relationship y=mx+b |
constant | Logical value that specifies whether to force the constant b to equal 0. If true or omitted then b is calculated normally; if false then b is equal to 0 and the m values are adjusted so that y=mx. |
stats | Logical value that specifies whether to return additional regression statistics. If true, then the additional regression statistics are returned if false or omitted then only the m-coefficients and b are returned. |
If x is omitted then x defaults to the array {1,2,3...}, that has the same dimensions as y.
Remarks
Use the INDEX function to get individual elements from the returned array.
Data Types
Accepts an array. Returns an array.
Examples
LINEST(A2:A7,C2:C7,,FALSE)