Category: FUNCTION | Updated: 2026-11-22

How to Use the TREND Function in Google Sheets | Batch-Calculate Linear Trend Forecasts

Syntax

=TREND(known_data_y, [known_data_x], [new_data_x], [b])
  • known_data_y: The cell range of known Y values (such as sales or traffic).
  • known_data_x (optional): The cell range of known X values (such as time periods). If omitted, a sequence 1, 2, 3... is automatically applied.
  • new_data_x (optional): The cell range of new X values for which you want predicted values. If omitted, trend values for the same range as known_data_x are returned.
  • b (optional): Specify TRUE (the default if omitted) to calculate the y-intercept normally, or FALSE to force the y-intercept to 0.

Example with a Table

Here is an example of batch-forecasting member counts for May through July (A6:A8) based on actual member counts from January through April (A2:B5).

Cell A (Month) B (Members) C (Formula)
1 Month Members Formula
2 1 500
3 2 620
4 3 730
5 4 850
6 5 965 =TREND(B2:B5, A2:A5, A6:A8)
7 6 1081 *Automatically spilled from B6 formula
8 7 1197 *Automatically spilled from B6 formula

By entering a single formula in cell B6, the three-month forecast for B6:B8 is output all at once.

Common Errors and Notes

  • #REF! Error (spill range blocked): When predicted results automatically spill across multiple cells, a #REF! error occurs if any destination cell (such as B7 or B8 above) already contains text or numbers. Keep the output cells blank.
  • #N/A Error: Occurs if known_data_y and known_data_x have mismatched range sizes.
  • Difference in argument order: Note that FORECAST takes x as its first argument, whereas TREND takes known_data_y first.

Frequently Asked Questions

Q. How do I output predicted values for multiple cells at once using TREND?

A. Specify a multi-cell range (e.g., A7:A9) for the third argument (new_data_x), and the predicted values will automatically spill into a matching number of rows and columns.

Q. What happens if I set the fourth argument (b / constant) to FALSE?

A. It forces the y-intercept (b) of the regression line to 0 (the form y = mx). Use this when modeling data where Y must be 0 when X is 0, such as zero sales when ad spend is zero.