Formualizer Docs
ReferenceFunctionsStatistics Functions

TREND

Returns fitted y-values along a linear trend derived from known data.

Summary

TREND performs simple linear regression and returns predictions for new_x (or defaults).

Remarks

  • known_y is required; known_x defaults to 1..n when omitted.
  • new_x defaults to known_x when omitted.
  • const defaults to TRUE; set to FALSE to force a zero intercept.
  • Returns spreadsheet errors for empty data, mismatched lengths, or degenerate x-variance.

Examples

Predict two future points on a line
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
[[8,10]]
Default x-values with fitted trend
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
[[3,5,7]]

Runtime metadata

Category

Statistics

Signature

TREND(arg1…: Number (Range))

This function accepts a repeating argument pattern (min args: 1).

Arity

min 1, max variadic

Arguments

arg1

Number · Range · coercion NumberLenientText

Caps

PURENUMERIC_ONLY

Source

On this page