Excel FORECAST.ETS function
The FORECAST.ETS function uses the Exponential Smoothing (ETS) algorithm to predict a future value based on a series of existing values. This function is best suited for non-linear data models with a seasonal pattern (date or time entries that are organized with a constant step like hourly, daily, monthly, yearly, etc.).
Note: This FORECAST.ETS function is only available in Excel 2016 and later versions, and not available in Excel for the Web, iOS, or Android.
FORECAST.ETS(target_date, values, timeline, [seasonality], [data_completion], [aggregation])
- Target_date (required): A date/time or a numeric value for which you want to predict a value;
- Values (required): The existing or historical known values for which you want to predict the next point (y values);
- Timeline (required): A range of date/time or numeric values corresponding to the “Values” (x values);
- Seasonality (optional): A numeric value used to define the length of the seasonal pattern. It can be:
0: No seasonality, which means that Excel will return a linear forecast;
1 or omitted (default value): Auto-detect, which means that Excel will automatically detect the seasonality and use positive, whole numbers for the length of the seasonal pattern;
N (an integer number): 2 ≦ N ≦ 8784 (the number of hours in a leap year), which means that Excel will use this specified number as the length of the seasonal pattern.
- Data_completion (optional): A numeric value specifies how to handle the missing points in the timeline. It can be:
0: Missing points will be treated as zeros;
1 or omitted: Missing points will be calculated as the average of the neighboring points.
- Aggregation (optional): A numeric value specifies which function will be used to aggregate several values with the same time stamp. The values and the corresponding functions are listed below.
| Numeric value
| 1 or omitted
1. The #N/A error occurs if “values” and “timeline” arrays are not the same size;
2. The #NUM! error occurs when any of the following conditions is met:
-- All “timeline” values are the same;
-- A constant step cannot be identified in the provided timeline;
-- “seasonality” is not in the range (0-8784);
-- “data_completion” is any number other than 0 or 1;
-- “aggregation” is out of the valid range (1-7).
3. The #VALUE! error occurs when target_date, [seasonality], [data_completion] or [aggregation] is nonnumeric.
It returns a numeric value.
As shown in the table below, using the monthly sales for 2021 to forecast the sales for January to July 2022, you can apply the FORECAST.ETS function to get it done as follows.
1. Create a helper column. In this case, I create a FORECASE column as shown in the screenshot below.
Tips: Creating a helper column helps to distinguish the predicted values from the actual values in a chart using different colors, which makes the chart more intuitive.
2. Find the cell containing the last sales (C17 in this case) in the Sales column, select a cell (D17) next to it in the helper column, and then enter a number that is the same as the last sales.
3. Select the cell D18, copy or enter the formula below and press the Enter key to get the result. Then select the result cell and drag its AutoFill Handle down to get other predicted values.
1) In the formula above, there are three numbers “1”.
1.1) The first number 1 tells Excel to automatically detect the seasonality and define a proper length of the seasonal pattern;
1.2) The second number 1 tells Excel to calculate the missing points as the average of the neighboring points;
1.3) The last number 1 tells Excel to average values with the same timestamp. You can change them according to your needs.
2) After getting all predicted values, you can select the entire table, click Insert > Insert Line or Area Chart > Line with Markers to create a forecast chart. See screenshot:
The Best Office Productivity Tools
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Supports Office/Excel 2007-2021 and 365 | Available in 44 Languages | Easy to Uninstall Completely
Full-Featured 30-Day Free Trial | 60-Day Unconditional Money-Back GuaranteeRead MoreDownload
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Full-Featured 30-Day Free Trial | 60-Day Unconditional Money-Back GuaranteeRead More Download