# FORECAST

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function calculates a future value using existing values.

## Syntax

FORECAST(*value*,*Yarray*,*Xarray*)

## Arguments

This function has these arguments:

| **Argument** | **Description** |
| -------- | ----------- |
| *value* | Value for which to predict the future dependent value |
| *Yarray* | An array of known dependent values (y’s) |
| *Xarray* | An array of known independent values (x’s) |

## Remarks

The predicted value is a y value for a given x value. The known values are existing x values and y values, and the new value is predicted by using linear regression. You can use this function to predict future sales, inventory requirements, or consumer trends.
This function is calculated as follows:
![FORECAST Equation](https://cdn.mescius.io/document-site-files/images/0ed25d3e-6b2a-4cf0-8f1b-7ed5ab18cf12/artwork/func-forecast.png)
where v is the *value* argument, Y is the *Yarray* argument, X is the *Xarray* argument, and n is the size of the arrays.

## Data Types

Accepts numeric data for all arguments. Returns numeric data.

## Examples

`FORECAST(30,G1:G9,F1:F9)`
`FORECAST(30,R1C7:R9C7,R1C6:R9C6)`
`FORECAST(45,{53000,57000,58000,69000,74500,55620,80000, 68700},{35,31,47,51,37,31,58,39})` gives the result 67060.8665320360

## Version Available

This function is available in product version 1.0 or later.

## See Also

[INTERCEPT](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionINTERCEPT) \| [Statistical Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsstats)