TREND function
Fits a straight line (least squares) to known data and returns predicted y-values for new x-values, e.g. next months' sales.
Available in All versions of Excel, including Microsoft 365 and Excel for the web (spills automatically in Microsoft 365 and Excel 2021+)
In every Excel versionWorks in Google Sheets
Syntax
TREND(known_y's, [known_x's], [new_x's], [const])| Argument | What it means | |
|---|---|---|
known_y's | Required | The observed values (e.g. revenue). |
known_x's | Optional | The matching x-values (one or more columns). Defaults to 1, 2, 3, ... |
new_x's | Optional | The x-values to predict for. Defaults to known_x's (returns the fitted values). |
const | Optional | TRUE or omitted: normal intercept. FALSE: force the line through zero. |
Returns: One predicted value per new_x, spilling when there are several.
How TREND works
TREND is Excel's straight-line forecasting tool. It fits the best line through your historical data, exactly as LINEST, SLOPE and INTERCEPT would, and then reads predictions off that line for whatever new x-values you supply. Typical uses: projecting next quarter's sales from a steady trend, estimating cost at a planned production level, or filling a trendline column next to actual figures for a chart.
TREND can handle several x columns at once (multiple regression), and it can return many predictions in one go: pass a range or array of new x-values and the results spill. For a single forecast with one x, FORECAST.LINEAR does the same job with a simpler syntax. A straight line assumes steady, additive change; for percentage growth use GROWTH, and for seasonal data consider FORECAST.ETS.
Examples
1Forecast next month's revenue
| A | B | |
|---|---|---|
| 1 | Month | Revenue (k) |
| 2 | 1 | 48.2 |
| 3 | 2 | 50.1 |
| 4 | 3 | 53.8 |
| 5 | 4 | 55 |
| 6 | 5 | 58.9 |
| 7 | 6 | 60.4 |
| 8 | 7 | 63.26 |
Result: 63.26
The best-fit line rises about 2.53k per month. For month 7 it predicts 63.260000k (shown to 2 decimals).
2Spill a quarter's forecast
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Month | Revenue (k) | ||
| 2 | 1 | 48.2 | 63.26 | |
| 3 | 2 | 50.1 | 65.79 | |
| 4 | 3 | 53.8 | 68.32 | |
| 5 | 4 | 55 | ||
| 6 | 5 | 58.9 | ||
| 7 | 6 | 60.4 |
Three new months spill three predictions into D2:D4 (shown to 2 decimals).
3Trendline values beside the actuals
| A | B | C | |
|---|---|---|---|
| 1 | Month | Revenue (k) | |
| 2 | 1 | 48.2 | 48.07 |
| 3 | 2 | 50.1 | 50.60 |
| 4 | 3 | 53.8 | 53.13 |
| 5 | 4 | 55 | 55.67 |
| 6 | 5 | 58.9 | 58.20 |
| 7 | 6 | 60.4 | 60.73 |
Without new_x's, TREND returns the line's value at each existing month, spilling into C2:C7 (shown to 2 decimals). Chart columns B and C together to show actuals against the trend.
4Predict with two drivers
| A | B | C | |
|---|---|---|---|
| 1 | Km | Stops | Minutes |
| 2 | 5 | 2 | 24 |
| 3 | 12 | 4 | 49 |
| 4 | 8 | 3 | 35 |
| 5 | 20 | 6 | 78 |
| 6 | 15 | 3 | 52 |
| 7 | 3 | 1 | 14 |
| 8 | 10 | 3 | 40.0 |
Result: 40.0
Using distance and stops together, a 10 km route with 3 stops is predicted to take 40.038153 minutes (shown to 1 decimal).
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#REF! | known_y's and known_x's have different sizes, or new_x's has a different number of columns than known_x's. | Make the shapes consistent. |
#VALUE! | A cell in the ranges is blank or text. | Remove blank rows from the input data. |
#SPILL! | The cells where results should spill are occupied. | Clear the spill area. |
Tips
- Forecasts get less reliable the further you project beyond your data.
- Use dates directly as x-values; TREND then forecasts for any future date you supply.
- Check the fit with RSQ before trusting a forecast.
Questions
What is the difference between TREND and FORECAST.LINEAR?
Both use the same straight line. FORECAST.LINEAR takes one new x and one x column; TREND can handle several x columns and return many predictions at once.
Can TREND predict exponential growth?
No, it fits a straight line. Use GROWTH for growth by a constant percentage.
Google Sheets
TREND also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
TREND in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | LINTREND |
| Danish | TENDENS |
| Finnish | SUUNTAUS |
| French | TENDANCE |
| Italian | TENDENZA |
| Polish | REGLINW |
| Portuguese (Brazil) | TENDÊNCIA |
| Portuguese (Portugal) | TENDÊNCIA |
| Russian | ТЕНДЕНЦИЯ |
| Spanish | TENDENCIA |
| Turkish | EĞİLİM |