Excel FORECAST.LINEAR function

The FORECAST.LINEAR function predicts a future value based on existing values by using the linear regression.

Syntax

FORECAST.LINEAR(x, known_y's, known_x's)

Arguments

• 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)

Remarks

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
where

and

and and are the averages of know_x’s and known_y’s.

Return value

It returns a numeric value.

Example

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.

=FORECAST.LINEAR(B14,\$C\$6:\$C\$13,\$B\$6:\$B\$13)

After getting all predicted values, you can create a forecast chart based on the table data according to your needs. See the screenshot below:

Related Functions

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.

Excel FORECAST.ETS.CONFINT function
The FORECAST.ETS.CONFINT function calculates the confidence interval for the forecast value at the specified target date.

Excel FORECAST.ETS.SEASONALITY function
The FORECAST.ETS.SEASONALITY function returns the length of a seasonal pattern based on existing values and a timeline.

Excel FORECAST.ETS.STAT function
The FORECAST.ETS.STAT function returns a specified statistical value as a result of time series forecasting.

Excel FORECAST function
The FORECAST function predicts a future value based on existing values by using the linear regression.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ... Super VLookup: Multiple Criteria  |  Multiple Value  |  Across Multi-Sheets  |  Fuzzy Lookup... Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Columns to Select Same & Different Cells ... Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager | Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Excel Cells ...)  |  ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

• 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.