Forecast linear
FORECAST.LINEAR Function¶
The FORECAST.LINEAR function in Excel is similar to the FORECAST function and is used to predict or estimate a
future value along a linear trend. It is a more descriptive name for the same linear regression process seen in earlier
versions of Excel.
Key Features of FORECAST.LINEAR:¶
- Predicts a value based on a linear regression model.
- Requires a known set of x-values and y-values (independent and dependent variables).
- Useful for analyzing data with a linear relationship.
Syntax:¶
- x: The value for which to predict the corresponding
y. - known_y's: Array of dependent values (
y-values). - known_x's: Array of independent values (
x-values).
Formula:¶
The function uses this equation for a straight line:
Where:
a: the intercept of the regression line,b: the slope of the regression line,x: the value for whichyis calculated.
Excel calculates a (intercept) and b (slope) using the least-squares method:
- Slope (
b): - Intercept (
a):
Where x̄ and ȳ are the mean values of known_x's and known_y's, respectively.
Examples:¶
-
Predict sales for a specific time period:
Suppose you have sales data in the rangeB1:B5and the corresponding time periods inA1:A5. To predict sales for a future period (e.g.,6), use: -
Prediction based on experimental data:
If you have observed values of a dependent variable inC1:C10and independent variable inD1:D10, you can forecast a value when the independent variable is15: -
Referencing cells for dynamic forecasting:
Assume the x-value to predict is stored inE1, and the known datasets are inF1:F10asy-valuesandG1:G10asx-values. Use:
Notes:¶
- Linear Relationship: The
FORECAST.LINEARfunction assumes a linear relationship betweenxandy. For non-linear relationships, use other techniques or formulas. - Matching Array Lengths:
known_x'sandknown_y'sarrays must have the same length. - Error Cases:
- Non-numeric values in
known_x'sorknown_y'sreturn a#VALUE!error. - If
known_x'svalues have no variance (all the same), it returns a#DIV/0!error.
- Non-numeric values in
Applications:¶
- Business Forecasting: Estimate future sales, revenue, or costs based on past trends.
- Scientific Analysis: Predict future outcomes from experimental or observational data.
- Project Management: Anticipate deadlines or milestones based on historical completion trends.
Tip: For advanced forecasting, consider alternatives like
FORECAST.ETS,LINEST, orTRENDif the data doesn't adhere to a linear trend.