# MS Excel: FORECAST Function (WS)

This Excel tutorial explains how to use the Excel FORECAST function with syntax and examples.

## Description

The Microsoft Excel FORECAST function returns a prediction of a future value based on existing values provided.

## Syntax

The syntax for the FORECAST function in Microsoft Excel is:

`FORECAST( x-value, known_y_values, known_x_values )`

### Parameters or Arguments

x-value
The x-value used to predict the y-value.
known_y_values
The known y-values used to predict the y-value.
known_x_values
The known x-values used to predict the y-value.

Note:

• If x-value is not a numeric value, the FORECAST function will return the #VALUE! error.
• If known_y_values and known_x_values contain different numbers of elements, the FORECAST function will return the #N/A error.

## Applies To

The FORECAST function can be used in the following versions of Microsoft Excel:

• Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000

## Type of Excel Function

The FORECAST function can be used in Microsoft Excel as the following type of function:

• Worksheet function (WS)

## Example (as Worksheet Function)

Let's look at some Excel FORECAST function examples and explore how to use the FORECAST function as a worksheet function in Microsoft Excel:

Based on the Excel spreadsheet above, the following FORECAST examples would return:

```=FORECAST(5, B2:B6, A2:A6)
Result: 20.03269866

=FORECAST(10, B2:B6, A2:A6)
Result: 11.8937852

=FORECAST(8, {1,2,3}, {4,5,6})
Result: 5

=FORECAST(7, {5.8, -1}, {2, -5})
Result: 10.65714286

=FORECAST(50, {-1,-2,-3,-4}, {10,20,30,40})
Result: -5```
Share: