Apple Numbers LINEST Function: Coefficients and Regression Statistics
Fit complete one- and two-predictor datasets with independent coefficient, residual, standard-error and statistics-array checks.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
LINEST fits a least-squares linear model and returns an array containing its coefficients, optionally with additional regression statistics. A coefficient array is not just a single slope: the intercept is included, and multiple predictors are returned in reverse predictor order.
Availability and verification
The official LINEST reference was retrieved October 15, 2026. The original introduction release and last functioning version are unknown from the checked first-party evidence. Current documentation is not a final supported-version endpoint or a test of every older Numbers client.
No native Numbers session was executed. Fixed examples below are independent controls; remotely supplied values are not claimed as current observations. First-party example values, when identified, remain source examples rather than newly retrieved native results.
Syntax and defaults
LINEST(known-y-values, known-x-values, nonzero-y-intercept, more-stats)
known-y-values contains the responses. Optional known-x-values supplies predictors; if omitted, Apple uses 1, 2, 3 and so on. With one predictor, the collections should have matching sizes. Multiple predictors must align with a single response row or column.
nonzero-y-intercept defaults to TRUE/1, estimating the intercept normally; FALSE/0 forces it to zero. more-stats defaults to FALSE/0; TRUE/1 requests the statistics array. The examples use explicit modes when comparing models.
Complete five-record worksheet
Put headers Y and X in A1:B1, then enter:
| Row | A: Y | B: X |
|---|---|---|
| 2 | 2 | 1 |
| 3 | 4 | 2 |
| 4 | 5 | 3 |
| 5 | 4 | 4 |
| 6 | 5 | 5 |
=LINEST(A2:A6,B2:B6,TRUE,FALSE) has independent coefficient target 0.6, 2.2, meaning predicted Y = 0.6*X + 2.2. The second value is the intercept, not another slope for this one-predictor model.
Because the predictor values are exactly 1 through 5, =LINEST(A2:A6) has the same independent target under the documented defaults. This equivalence depends on the actual X sequence; it is not true for every dataset with five records.
Reconstruct fitted values and residuals
The fitted values are 2.8, 3.4, 4, 4.6 and 5.2. Subtracting them from the observed responses gives residuals -0.8, 0.6, 1, -0.6 and -0.2. The residual sum is zero for this fitted-intercept model, and the residual sum of squares is 2.4.
The response mean is 4. The total centered sum of squares is 6, and the explained regression sum of squares is 3.6. Their identity, 3.6 + 2.4 = 6, is a useful independent reconciliation.
Additional-statistics array
For =LINEST(A2:A6,B2:B6,TRUE,TRUE), Apple’s documented layout has these independent one-predictor targets:
| Array row | Column 1 | Column 2 |
|---|---|---|
| 1 | slope 0.6 | intercept 2.2 |
| 2 | slope SE 0.2828427125 | intercept SE 0.9380831520 |
| 3 | R-squared 0.6 | residual standard error 0.8944271910 |
| 4 | F statistic 4.5 | residual degrees of freedom 3 |
| 5 | regression SS 3.6 | residual SS 2.4 |
The standard errors use the residual variance 2.4/3 = 0.8. R-squared is 3.6/6 = 0.6. These calculations validate the displayed statistics without claiming that the environment executed Numbers’ array engine.
Advanced: force the intercept to zero deliberately
With FALSE for nonzero-y-intercept and FALSE for more-stats, the coefficient target becomes 1.2, 0. The slope is sum(X*Y)/sum(X^2) = 66/55 = 1.2.
This is a different fitted model. Its residual sum of squares is 6.8, larger than 2.4 for the unconstrained fit. Forcing zero should follow a justified model assumption, not merely a preference for a simpler-looking equation. Additional-statistics conventions for constrained fits are not inferred from the unconstrained table above.
Advanced: two predictors and reversed coefficient order
Put headers Y, X1 and X2 in A10:C10 and the four rows 1,0,0; 3,1,0; 4,0,1; and 6,1,1 in A11:C14. Use =LINEST(A11:A14,B11:C14,TRUE,FALSE). The independent exact model is Y = 2*X1 + 3*X2 + 1.
Apple returns slopes in reverse predictor order, so the coefficient row is 3, 2, 1: X2 slope, X1 slope, then intercept. The four predictions are 1, 3, 4 and 6. This exact fit is a coefficient-order fixture, not a claim about finite F statistics or significance when residual variance is zero.
Errors and troubleshooting
The source’s simple example loosely calls both returned values slopes, but its detailed layout explicitly identifies the final coefficient as the intercept. Use the detailed layout when labelling output.
Check predictor alignment, missing observations, numeric types and model constraints before interpreting coefficients. The reference allows numeric or date/time collections, but this guide’s executed independent controls use numbers only.
Native behavior for singular predictor matrices, constant responses, empty inputs, text coercions and blocked array output was not tested. The page does not supply a complete error matrix for them. Regression association alone does not establish causation or guarantee useful out-of-sample predictions.