Contact

TREND Function in Microsoft Excel: Syntax, Examples & Troubleshooting

Statistical Intermediate Microsoft Excel

Predict Excel linear-fit values with TREND. Work through noisy data, fitted versus future values, omitted x defaults and the effect of forcing a zero intercept.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: TREND fits a least-squares straight line to known observations and returns predicted y values for supplied x values. Unlike a coefficient-returning regression function, the output contains fitted or predicted values themselves.

Syntax and defaults

=TREND(known_y's, [known_x's], [new_x's], [const])

Known y values are required. Known x is optional and defaults to 1,2,3,…. New x is optional and defaults to known x, so omitting it returns fitted values at the observed input positions. If both x arguments are omitted, both use that sequential index.

const TRUE or omitted fits an intercept normally. FALSE sets the intercept to 0 and refits the coefficients. This is a substantive model constraint, not a display option.

Worked example: predict two new input levels

Put x values 1,2,3,4 in A2:A5 and corresponding y values 3,5,4,8 in B2:B5. Put new x values 5,6 in D2:D3.

  1. Enter =TREND(B2:B5,A2:A5,D2:D3) in E2, reserving E2:E3.
  2. Expected output: 8.5, 9.9.
  3. Independently check the fitted equation y = 1.4x + 1.5.

The original data are not perfectly straight, so the line is a least-squares compromise. It does not join the final two observations and extend their steep slope. The data include a drop from 5 to 4, but TREND still fits one straight relationship over the entire selected sample.

Second example: inspect fitted values at the observed x values

Enter =TREND(B2:B5,A2:A5) in G2 with G2:G5 available. Expected output: 2.9, 4.3, 5.7, 7.1. The observed values minus fitted values are 0.1, 0.7, −1.7, 0.9, whose squared sum is 4.2.

These residuals reveal what the model misses. Returning fitted values at the known x positions does not copy the original y values unless those values lie exactly on the fitted relationship.

Because this example’s x values are already 1 through 4, =TREND(B2:B5) gives the same fitted values. That equivalence would not hold for observations at irregular times such as 1,2,5,9; supply actual x values in that case.

Advanced application: test a zero-intercept assumption

For the original dataset, =TREND(B2:B5,A2:A5,D2:D3,FALSE) has expected output 9.5, 11.4. The constrained slope is 57/30 = 1.9, with intercept fixed at zero.

Simply taking the earlier slope 1.4 and dropping the 1.5 intercept would predict 7 and 8.4, which is not the constrained least-squares calculation. Use const FALSE only when the relationship is meant to pass through zero, and compare its residuals before adopting it.

TREND can also fit multiple predictors, including manually supplied powers of x for polynomial models. In that case new_x must include matching predictor columns in the same order. The function does not automatically select the appropriate polynomial degree, detect seasonality or make extrapolation reliable. Predicting outside the observed range is a modeling assumption rather than evidence of future demand.

Array entry and data-shape checks

In a current Microsoft 365 build with dynamic arrays, enter the formula in the top-left output cell and press Enter, leaving enough empty cells for its result. In a legacy array workflow, select the intended output range first and confirm the formula with Ctrl+Shift+Enter. Excel inserts the braces; do not type them manually.

Keep each observed y paired with the corresponding x row. A single predictor requires matching x/y dimensions. For multiple predictors, a column of y observations uses one x column per predictor; a row of y observations uses one x row per predictor. New prediction inputs must retain the same predictor layout. Headers are not observations.

A blocked dynamic-array destination can produce #SPILL!, while incomplete legacy output selection can hide results. The reviewed function page does not provide a complete invalid-shape/error/coercion table, so no cross-application error behavior is assumed here. Inspect missing, text and erroneous source values rather than silently replacing them with zeros.

Compatibility and verification

Microsoft’s reference checked on October 17, 2026 lists: Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel 2024 Excel 2024 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2016. This current support list does not establish the first release. The introduction version and last functioning version have not been established from the reviewed documentation. No retirement is asserted.

Example verification: Expected numerical results are independently calculated; text and shape expectations follow the documented contract. These examples have not been tested in Microsoft Excel. No screenshot or native execution is claimed.