Contact

LINEST Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Read LINEST coefficients and statistics in Apache OpenOffice Calc. Verify result positions, residual sums and degrees of freedom with a complete numeric example.

Verification status: Eight ordinary scalar or INDEX-selected reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, through generated native ODF and GUI hard recalculation. Saved identities, inputs and results were checked. How formula examples are checked

Quick answer: =INDEX(LINEST(J10:J14;I10:I14;1;1);1;1) returned 3.2 in the tested Apache OpenOffice 4.1.16 build. Use the numeric worksheet setup below for these range addresses.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
  • Scope: Desktop Calc, English function names and semicolon-separated formulas.
  • Checked: October 14, 2026. Eight ordinary scalar or INDEX-selected reference formulas were recalculated from generated ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent arithmetic were checked.

What LINEST returns

LINEST returns least-squares linear coefficients and, optionally, a matrix of fit statistics. For one predictor with an intercept, the first result row is slope then intercept. It does not return predicted y values; TREND or a coefficient formula does that. Release implementation.

Syntax and arguments

LINEST(KnownY[;KnownX[;Constant[;Statistics]]])
  • KnownY: required observed responses. KnownX: optional predictors, defaulting to a simple 1,2,… sequence when omitted.
  • Constant: optional TRUE by default; FALSE forces a zero intercept.
  • Statistics: optional FALSE by default; TRUE requests five result rows. The examples explicitly enable both flags.

Numeric worksheet setup

Enter the following numbers in their stated worksheet rows. K14 is unused; the prediction range is K10:K13.

Worksheet row I: known x J: observed y K: new x L: exponential y
10 1 5 0 6
11 2 8 2.5 12
12 3 12 6 24
13 4 14 7 48
14 5 18 — 96

GROWTH uses the positive values in L10:L14. The other regression examples use J10:J14. Keep each observed x-y pair aligned.

Eight reproducible examples

The native column contains saved 4.1.16 results; independent references use high-precision arithmetic and the stated source rules. Values are shown to twelve decimal places where needed. The range examples use the numeric setup above.

Formula Native 4.1.16 result Independent reference
=INDEX(LINEST(J10:J14;I10:I14;1;1);1;1) 3.2 3.2
=INDEX(LINEST(J10:J14;I10:I14;1;1);1;2) 1.8 1.8
=INDEX(LINEST(J10:J14;I10:I14;1;1);3;1) 0.992248062016 0.992248062016
=INDEX(LINEST(J10:J14;I10:I14;1;1);3;2) 0.516397779494 0.516397779494
=INDEX(LINEST(J10:J14;I10:I14;1;1);4;1) 384 384
=INDEX(LINEST(J10:J14;I10:I14;1;1);4;2) 3 3
=INDEX(LINEST(J10:J14;I10:I14;1;1);5;1) 102.4 102.4
=INDEX(LINEST(J10:J14;I10:I14;1;1);5;2) 0.8 0.8

Practical worksheet

For the given five x-y pairs, the coefficient row is 3.2,1.8, defining y=1.8+3.2x. With Statistics=TRUE, row 3 contains R² and residual standard error, row 4 contains F and residual degrees of freedom, and row 5 contains regression and residual sums of squares.

The native component examples give R²≈0.992248062016, residual standard error≈0.516397779494, F=384 and degrees of freedom=3. The sums of squares are 102.4 explained and 0.8 residual.

Advanced interpretation and checks

Five observations minus two fitted coefficients leaves three residual degrees of freedom. The residual standard error is sqrt(0.8/3), and R²=102.4/(102.4+0.8)=128/129. For this one-predictor fit, F=102.4/(0.8/3)=384. These identities independently reconcile the output positions.

Row 2, documented by the source, contains coefficient standard errors; the native table here selects other components. Statistical inference from standard errors or F requires assumptions about the model and residuals. A high R² alone does not establish causation, adequate residual behavior or out-of-sample accuracy.

Boundaries and troubleshooting

The matrix checker requires numeric entries, compatible shapes and enough samples. Multiple-predictor output ordering and rank deficiency require additional care; the native examples are explicitly a one-predictor, full-rank fit with nonzero residuals. Invalid shapes, text entries and exact-fit special cases were not executed.

INDEX selects the one-based row and column stated in each formula. The evidence establishes those scalar components, not full GUI array entry or automatic placement of the five-row result. Preserve the distinction between coefficients, predicted values and fit statistics.

Official evidence and checking scope

The generated ODF produced the informational load warning “Not all attributes could be read.” The sheet was hard-recalculated and saved separately. All eight ordinary formula identities, inputs and selected results were reconciled; a stale SUM cache changed from 999999 to 3 and an uncached SUM returned 7. This establishes the stated examples, not every workbook style, invalid input or GUI whole-array entry. INDEX wrappers select individual returned components. Other explanatory identities are independent calculations. The authoring-tool XLSX was not executed in OpenOffice, and its preview values are not the native results reported here.