FORECAST
The FORECAST function in Google Sheets is a powerful tool to calculate the expected y-value for a specified x based on a linear regression of a dataset.
Function Syntax and Parameters
Syntax: FORECAST(x, data_y, data_x)
Parameters:
x: The x-value for which you want to calculate the expected y-value.data_y: The array or range containing the dependent variable values.data_x: The array or range containing the independent variable values.
Step-by-Step Tutorial
-
Using
FORECASTwith a single x-value:- Example:
=FORECAST(5, A2:A10, B2:B10) - Result: Returns the expected y-value for x=5 based on the linear regression of the dataset.
- Example:
-
Using
FORECASTwith arrays or ranges:- Example: If
A2:A10contains the x-values andB2:B10contains the y-values, then=FORECAST(A2:A10, B2:B10)will return the expected y-values for each x-value in the range.
- Example: If
Use Cases and Scenarios
- Sales Forecasting: Predict future sales based on historical data.
- Financial Analysis: Estimate future revenue based on current trends.
- Market Research: Determine customer demand based on various factors.
Related Functions
SLOPE: Calculates the slope of the linear regression line.INTERCEPT: Calculates the y-intercept of the linear regression line.