FORECAST Function (OpenOffice Calc)
Fit a straight-line FORECAST in Apache OpenOffice Calc. Reproduce predictions, inspect least-squares coefficients and distinguish interpolation from uncertain extrapolation.
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: =FORECAST(0;J10:J14;I10:I14) 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 FORECAST returns
FORECAST returns the fitted y value at one supplied x using simple linear least squares with an intercept. The known-y range comes before the known-x range. The function computes a straight line; its name does not make the result a reliable prediction of future events. Release implementation.
Syntax and arguments
FORECAST(NewX;KnownY;KnownX)
- NewX: required x position at which to evaluate the fitted line.
- KnownY: observed y values. KnownX: corresponding x values.
- Exactly three arguments are required; keep each x-y pair aligned and use equal-shaped numeric ranges.
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 |
|---|---|---|
=FORECAST(0;J10:J14;I10:I14) |
1.8 |
1.8 |
=FORECAST(1;J10:J14;I10:I14) |
5 |
5 |
=FORECAST(2.5;J10:J14;I10:I14) |
9.8 |
9.8 |
=FORECAST(3;J10:J14;I10:I14) |
11.4 |
11.4 |
=FORECAST(5;J10:J14;I10:I14) |
17.8 |
17.8 |
=FORECAST(6;J10:J14;I10:I14) |
21 |
21 |
=FORECAST(7;J10:J14;I10:I14) |
24.2 |
24.2 |
=FORECAST(-1;J10:J14;I10:I14) |
-1.4 |
-1.4 |
Practical worksheet
For x=1,2,3,4,5 and y=5,8,12,14,18, the fitted line is y=1.8+3.2x. At x=2.5, FORECAST gives 9.8. At x=6 it gives 21; at x=0 it gives the fitted intercept 1.8.
The fitted value at x=3 is 11.4, rather than the observed 12. Least squares fits all points together instead of forcing the line through every observation. The residual at that point is 12−11.4=0.6.
Advanced interpretation and checks
The slope is Σ((x−mean_x)(y−mean_y))/Σ(x−mean_x)^2, and the intercept is mean_y−slope×mean_x. Here mean_x=3, mean_y=11.4, the cross-product sum is 32 and the x squared-deviation sum is 10. This yields slope 3.2 and intercept 1.8.
An x within the observed span is interpolation; x=6 or 7 is extrapolation beyond these data. A fitted line provides no prediction interval by itself and does not prove that the same relationship continues outside the observed range.
Boundaries and troubleshooting
The source checks matching range dimensions, skips paired positions containing a string, and errors when the included x squared-deviation sum is zero. The ordinary native fixture contains complete numeric pairs; mixed types, constant-x data and missing arguments were not executed.
When observations are filtered or sorted, move paired x and y values together. A convincing-looking result can still come from misaligned data. The eight tests verify numerical evaluation of the stated line, not statistical assumptions or forecasting performance.
Related functions
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.