1. Home
  2. Functions
  3. Statistical
  4. TREND

TREND function

Returns values along the least squares straight line that fits the known data.

Syntax

=TREND(known_ys, [known_xs], [new_xs], [const])

Arguments

ArgumentRequiredDescription
known_ysRequiredThe dependent values
known_xsOptionalThe independent values
new_xsOptionalThe x values to predict for (the known x values when left out)
constOptionalTRUE or left out to calculate the intercept, FALSE to force it to 0

How to use TREND

When TREND returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

TREND takes 1 required argument and 3 optional arguments. Type =TREND( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=TREND({1;9;5;7}, {0;4;2;3}, {5;6})Result 2 by 1 array
Spilled result
A
111
213
=TREND({2;4;6})Result 3 by 1 array
Spilled result
A
12
24
36

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.