TREND in Collabora Office: Predict Values Along a Fitted Straight Line
Use Collabora TREND with explicit arrays, calculate new linear predictions, compare an intercept with a forced-origin model, and inspect residuals.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: For X values 0,1,2,3 and Y values 3,5,7,9, the line is y=3+2x. TREND has independent predictions 11 and 13 at new X values 4 and 5.
Syntax and intercept choice
=TREND(DataY [; DataX [; NewDataX [; LinearType]]])
DataY is the observed-Y array. DataX optionally gives its matching X array. NewDataX optionally gives the positions where the fitted line is evaluated. LinearType 0 forces the line through the origin; a nonzero value permits an intercept. The vendor states that the default is nonzero.
The page’s optional-parameter guidance says to omit an optional argument only when no argument follows it. The examples supply all four positions explicitly, so neither a guessed omitted-X sequence nor empty intermediate slots are required.
TREND returns predicted Y values. It does not directly return a slope/intercept report or establish that the relationship is causal.
Example: forecast a simple linear sequence
Enter A2:B5:
| Row | A: X | B: Y |
|---|---|---|
| 2 | 0 | 3 |
| 3 | 1 | 5 |
| 4 | 2 | 7 |
| 5 | 3 | 9 |
Put 4 and 5 in D2:D3. Select E2:E3 and enter as an array:
=TREND(B2:B5;A2:A5;D2:D3;1)
The independently expected results are 11 and 13. A separate control =3+2*D2, filled down, reproduces those predictions exactly in ordinary arithmetic.
Enter the result as an array
The Collabora page documents array entry: select the intended output range, enter the formula, and confirm with Ctrl+Shift+Enter on the corresponding platform, or use the Function Wizard with Array checked. On platforms using Command, follow the Command/Ctrl shortcut indicated by the help. Do not type the outer array-formula braces yourself.
The category guidance warns that ordinary entry can return only the upper-left value. Existing array results are edited by selecting the whole array, not by overwriting one member cell. This guide does not assume modern automatic spill behavior from another spreadsheet.
Advanced example: forcing the origin changes the answer
Keep the same observed data but change LinearType to 0. The independent least-squares slope through the origin is:
=SUMPRODUCT(A2:A5;B2:B5)/SUMPRODUCT(A2:A5;A2:A5)
Its value is 46/14=23/7, approximately 3.285714286. At X=4 and X=5 the forced-origin predictions become approximately 13.142857143 and 16.428571429.
The unrestricted model had intercept 3 and slope 2. The constrained model cannot represent that nonzero intercept, so its slope changes to compensate. Use a zero-intercept model only when the underlying question justifies it.
SUMPRODUCT makes the independent slope calculation visible. This is an algebraic audit for the stated data, not a native execution of TREND.
Advanced application: inspect fitted residuals
Use the original A2:A5 as NewDataX and LinearType 1. The independent fitted values are 3,5,7,9, exactly matching the observed sequence. Subtract fitted values from observed Y in a separate column; residuals are all zero for this deliberately exact example.
For less regular data, inspect the pattern of residuals rather than only the forecast. Curvature, outliers, or changes in the process can make a straight-line model misleading even when a function returns numbers successfully.
A zero residual in a tiny constructed example does not prove that later real observations will follow the same line. A forecast outside the observed X range is extrapolation and relies on assumptions about continuing behavior.
Units, errors, and troubleshooting
The slope is measured in Y units per X unit. If X is elapsed months, a prediction at X=5 means five months in that same coordinate system. A worksheet row number, a calendar serial date, and an elapsed-month index are not interchangeable inputs.
Match the observed X and Y arrays row for row. Do not sort only one array. Use numeric values and preserve the source records so a prediction can be traced back to its inputs.
The dedicated section does not provide a complete coercion/error table or every singular-data rule. A model with no variation in X cannot identify an ordinary slope from the data; this guide does not assign a native error code to that case. SLOPE and INTERCEPT are related guides for inspecting line coefficients separately.
Availability and verification
The exact function is documented in Collabora Office 26.04 desktop help, retrieved and reviewed on October 17, 2026. This establishes a documentation scope, not the first release that introduced the function or the last version in which it works; those versions and any retirement date remain unestablished. Collabora Online and mobile support are not inferred from desktop help, nor is behavior in another spreadsheet product.
The examples are documentation-based expectations with independent calculations. They have not been executed in Collabora Office. No application screenshot or native error/coercion certification is implied. Formulas use English function names and semicolon argument separators.
References
- Collabora Office 26.04: TREND (checked October 17, 2026).
- Editorial testing standards.