LINEST in FreeOffice PlanMaker: Syntax and Worked Examples
Read LINEST slopes, intercepts and regression statistics, with reversed multiple-predictor coefficient order and explicit residual checks.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
LINEST returns least-squares regression coefficients, not fitted y values. With one predictor, its first row is slope, intercept. With several predictors, slopes appear in reverse predictor order, followed by the intercept.
For x=1,2,3,4 and y=2,4,5,8, the independent fitted line is y=1.9x+0. The residual sum of squares is 0.7; the points do not lie exactly on the fitted line.
Syntax and options
=LINEST(y_values [, x_values] [, Constant] [, Stats])
Omitted x values default to 1,2,3,… . Constant TRUE or omitted fits the intercept; FALSE fixes it at zero and refits the slope coefficients. Stats FALSE or omitted returns only coefficients; TRUE adds regression statistics.
For a single predictor, the documented statistics layout is five rows by two columns:
| Row | Column 1 | Column 2 |
|---|---|---|
| 1 | Slope m | Intercept b |
| 2 | Standard error of m | Standard error of b |
| 3 | R² | Standard error for y |
| 4 | F statistic | Residual degrees of freedom |
| 5 | Regression sum of squares | Residual sum of squares |
For multiple predictors, the coefficient and coefficient-error rows widen. Their slopes are ordered m_n,…,m_1,b. Do not assign names by the left-to-right input order without reversing the coefficients.
Worked example: coefficients and residuals
Enter x values 1,2,3,4 in A2:A5 and y values 2,4,5,8 in B2:B5. Independent means are x̄=2.5 and ȳ=4.75. The centered cross-product sum is 9.5 and centered x-square sum is 5, so m=9.5/5=1.9 and b=4.75−1.9×2.5=0.
The fitted values are 1.9,3.8,5.7,7.6. Residuals y−ŷ are 0.1,0.2,−0.7,0.4. Squaring and adding gives 0.7. Total centered y sum of squares is 18.75, so R²=1−0.7/18.75=0.9626666667 approximately. With four observations and two fitted coefficients, residual degrees of freedom are 2.
Useful component checks are:
=INDEX(LINEST(B2:B5,A2:A5),1,1)
=INDEX(LINEST(B2:B5,A2:A5),1,2)
=INDEX(LINEST(B2:B5,A2:A5,TRUE,TRUE),5,2)
Their independent expectations are 1.9,0,0.7. These scalar component expressions do not demonstrate a full native array-entry operation.
Advanced example: two predictor columns
Enter D2:D6 as 0,1,0,1,2; E2:E6 as 0,0,1,1,1; and F2:F6 as 1,3,4,6,8. The exact model is y=1+2D+3E.
The first row from =LINEST(F2:F6,D2:E6) should be 3,2,1: E’s coefficient, D’s coefficient, then the intercept. Scalar INDEX columns 1,2,3 check this order individually. With Constant FALSE, the returned intercept component is expected to be zero; the slopes must then be refitted and should not be assumed to remain 3 and 2.
The official array workflow uses an appropriately sized selected destination and Ctrl+Shift+Enter. For the coefficient-only two-predictor example, the destination is one row by three columns. That workflow is documented, while the native evidence here is limited to scalar readbacks.
Statistical and numerical safeguards
R² summarizes in-sample fit, not causal validity or future prediction accuracy. A perfect or nearly perfect fit can make some inferential statistics undefined or unstable. The exact two-predictor example is used to check coefficient order, not to certify finite F statistics or standard errors.
Linearly dependent predictor columns do not identify a unique set of coefficients. The help does not establish every singular-design or malformed-range error. Avoid duplicate predictors and verify rank and data alignment before interpreting coefficients. The native scope does not claim a general singular-regression policy.
Forcing the intercept changes the model and can change statistical definitions. Do not carry over the fitted-intercept degrees of freedom or centered R² calculation to a forced-origin fit without checking the intended convention.
Native coefficient order and selected statistics
Ten scalar INDEX formulas were calculated in FreeOffice PlanMaker 2024 revision F1238.1005. The ordinary line returned slope 1.9, intercept 0, residual degrees of freedom 2, residual sum of squares 0.7, and R² 0.962666666666667. Omitted x returned the same slope 1.9. The two-predictor coefficients were 3,2,1, confirming the reversed slope order and final intercept in this dataset. With Constant FALSE, the returned intercept component was 0; the refitted slope values were not tested. All ten expressions and twenty-three numeric inputs survived native PMDX save and reopen. Other statistics and singular-regression behavior remain outside the tested scope.

Selected J2 displays slope 1.9. J5:J7 show degrees of freedom 2, residual sum 0.7 and rounded R² 0.96267. J8:J10 show reversed coefficients 3,2 and intercept 1; J11 shows the forced intercept 0. Each output is a separate scalar readback.
Version and verification scope
The official FreeOffice PlanMaker 2024 reference was checked October 18, 2026. The installed application is FreeOffice PlanMaker 2024 revision F1238.1005. The original introduction version is not established by this evidence; the current reference does not identify the function as deprecated or retired. No availability claim for a different edition or a 2026 release is implied.
The native section records scalar INDEX component readbacks or residual expressions calculated in revision F1238.1005 and preserved after PMDX save and reopen. It does not demonstrate multi-cell native array entry or automatic spilling. Official array workflow instructions are documentation-derived. Independent additional arithmetic and untested cases are identified separately. English formulas in this guide use commas; use the separators required by your formula settings.