Excel FORECAST.LINEAR function
The FORECAST.LINEAR function predicts a future value based on existing values by using the linear regression.
FORECAST.LINEAR(x, known_y's, known_x's)
- x (required): The data point (x value) for which you want to predict a y value;
- known_y’s (required): The dependent array or range of data (y values)
- known_x’s (required): The independent array or range of data (x values)
1. As the FORECAST.LINEAR function was first introduced in Excel 2016 to replace the FORECAST function, it only available in Excel 2016 and later versions;
2. The #VALUE! error occurs if x is nonnumeric;
3. The #N/A error occurs if known_y’s and know_x’s arrays are not the same size;
4. The #DIV/0! error occurs if the variance of know_x’s equals to zero;
5. The equation for the FORECAST.LINEAR function is:
y = a + bx
are the averages of know_x’s and known_y’s.
It returns a numeric value.
As shown in the table below, there is a list of monthly sales from January to August, to predict the future sales along the linear trend, you can try the FORECAST.LINEAR function 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 (C13 in this case) in the Sales column, select a cell (D13) next to it in the helper column, and then enter a number that is the same as the last sales.
3. Select the cell D14, 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.
After getting all predicted values, you can create a forecast chart based on the table data according to your needs. See the screenshot below:
The Best Office Productivity Tools
Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings
300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save
80% time for you.
- Designed for
1500 work scenarios, helps you solve
80% Excel problems.
- Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
- Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
- 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, Firefox, And New Internet Explorer.