<< Go back to all functions

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

  1. Using FORECAST with 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.
  2. Using FORECAST with arrays or ranges:

    • Example: If A2:A10 contains the x-values and B2:B10 contains the y-values, then =FORECAST(A2:A10, B2:B10) will return the expected y-values for each x-value in the range.

Use Cases and Scenarios

  1. Sales Forecasting: Predict future sales based on historical data.
  2. Financial Analysis: Estimate future revenue based on current trends.
  3. 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.

Related Articles