Contact

TREND Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Return linear TREND components in Apache OpenOffice Calc. Compare fitted and forced-origin models, default x values and reproducible INDEX predictions.

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(TREND(J10:J14;I10:I14;K10:K13);1;1) returned 1.8 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 TREND returns

TREND fits a least-squares linear model and returns fitted y values for new x positions. Its result is a matrix. With Constant omitted or TRUE, the model includes an intercept; FALSE forces the intercept to zero and refits the slope. Release implementation.

Syntax and arguments

TREND(KnownY[;KnownX[;NewX[;Constant]]])
  • KnownY: required observations. KnownX: optional corresponding predictors; omitted values default to 1,2,… in the simple case.
  • NewX: optional prediction positions; omission uses the known x positions.
  • Constant: optional, defaults TRUE. FALSE imposes a zero intercept. The examples use one predictor.

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(TREND(J10:J14;I10:I14;K10:K13);1;1) 1.8 1.8
=INDEX(TREND(J10:J14;I10:I14;K10:K13);2;1) 9.8 9.8
=INDEX(TREND(J10:J14;I10:I14;K10:K13);3;1) 21 21
=INDEX(TREND(J10:J14;I10:I14;K10:K13);4;1) 24.2 24.2
=INDEX(TREND(J10:J14;I10:I14;K10:K13;0);1;1) 0 0
=INDEX(TREND(J10:J14;I10:I14;K10:K13;0);3;1) 22.145454545454 22.145454545455
=INDEX(TREND(J10:J14);1;1) 5 5
=INDEX(TREND(J10:J14);5;1) 17.8 17.8

Practical worksheet

Using the ordinary regression data, the intercept-enabled line is y=1.8+3.2x. For new x values 0,2.5,6,7, the selected TREND outputs are 1.8,9.8,21,24.2. The INDEX wrapper selects one output row at a time.

When only KnownY is supplied, the source creates x=1 through 5 and evaluates at those same positions. The first and last fitted values in the examples are 5 and 17.8. They need not equal every original observed y value.

Advanced interpretation and checks

Forcing Constant=FALSE does more than remove the old intercept. The slope is refitted as Σxy/Σx², here 203/55≈3.690909090909. The predicted value at x=6 is approximately 22.145454545455, and at zero it is zero.

The choice between an intercept and an origin constraint should come from the model’s meaning, not from which line looks preferable. Multiple-predictor regression is supported by the source, but the native examples here use one predictor and do not validate multicollinear or arbitrary high-dimensional datasets.

Boundaries and troubleshooting

The source checks numeric matrix entries, predictor-response dimensions and enough samples for its fitted parameters. Missing or text observations, rank-deficient designs and invalid shapes were not executed. Unlike FORECAST’s paired-string filtering path, the regression matrix checker requires value entries; do not assume identical mixed-type behavior.

The tested INDEX expressions establish selected predicted values from returned matrices. They do not test whole-result placement, GUI array-entry or spilling. Predictions outside the observed x range remain extrapolations, without an automatically supplied uncertainty interval.

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.