TREND Function
Fits a linear trend and returns predicted y-values (array).
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| known_ys | The dependent (y) values of the known data used to fit the line. | Required |
| known_xs | The independent (x) values of the known data; defaults to 1,2,3,... if omitted. | Optional |
| new_xs | The x-values at which to predict y. If omitted, the known x-values are reused. | Optional |
| const | TRUE (or omitted) includes an intercept; FALSE forces the line through the origin. | Optional |
Basic Example
Predict a single future point
=TREND({2,3,5,7,11},{1,2,3,4,5},6)The fitted line is y = -1 + 2.2x, so at x=6 the prediction is 12.2 (same as FORECAST).
Advanced Examples
Example 1: Predict several points at once
Project multiple future periodsSupply an array of new x-values to get an array of predictions
=TREND({2,3,5,7,11},{1,2,3,4,5},{6,7})Example 2: Force line through origin
Physical quantity with zero interceptSet const to FALSE
=TREND(B2:B12,A2:A12,C2:C5,FALSE)How TREND Works
TREND performs ordinary least-squares linear regression (y = a + bx) on the known data, then evaluates that line at each value in new_xs. Because it accepts an array for new_xs, it can return many predictions in one formula. Text, logicals, and blanks in the known arrays are ignored.
Important Notes & Limitations
Models only a linear relationship; use GROWTH for exponential patterns.
known_xs and known_ys must have the same number of points, or #REF! is returned.
Returns an array, so in pre-dynamic Excel it must be entered as an array formula and needs enough empty cells to spill into.
Common Errors & Fixes
#REF!known_xs and known_ys differ in size, or new_xs cannot spill into the needed cells.Fix: Match the known array sizes and ensure output cells are empty.
#VALUE!A non-numeric or mis-shaped argument was supplied.Fix: Pass numeric, equal-length ranges.
Download Practice File
TREND
trendPractice TREND with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the TREND function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps