FORECAST.LINEAR
TheFORECAST.LINEAR
function calculates the predicted value of the yvariable for a given value of the xvariable based on linear regression. It is commonly used to predict future trends based on existing data points.
 How to use
FORECAST.LINEAR
formula?  Examples of using
FORECAST.LINEAR
formula FORECAST.LINEAR
formula not working? Similar formulas to
FORECAST.LINEAR
Usage
Use the FORECAST.LINEAR
formula with the syntax shown below, it has 3 required parameters:
 x (required):
The value for which you want to predict the yvalue.  data_y (required):
The array or range containing the dependent variable (yvalues) in the regression model.  data_x (required):
The array or range containing the independent variable (xvalues) in the regression model.
Examples
Here are a few example use cases that explain how to use theFORECAST.LINEAR
formula in Google Sheets.
Predicting future sales
If you have a set of sales data over a certain period of time, you can use FORECAST.LINEAR
to predict future sales based on the existing data points.
Predicting future website traffic
If you have website traffic data, you can use FORECAST.LINEAR
to predict future traffic and plan for server capacity and bandwidth requirements.
Predicting future inventory levels
If you have inventory data, you can use FORECAST.LINEAR
to predict future inventory levels, which can help with planning for purchasing and manufacturing activities.
Common Mistakes
FORECAST.LINEAR
not working? Here are some common mistakes people make when using the FORECAST.LINEAR
Google Sheets Formula:
Incorrect order of data_x and data_y
The order of the data_y and data_x parameters must be the opposite of what is expected based on the natural order of the data. Make sure to input the data_y parameter first followed by the data_x parameter.
Nonnumeric or nonadjacent input data
The input data for the data_y and data_x parameters must be numeric and adjacent. Check that all input data is numeric and that there are no blank cells between the data.
Insufficient data points
There must be at least two pairs of data points for the formula to work. Check that there are enough data points provided for the formula to work.
Related Formulas
The following functions are similar to FORECAST.LINEAR
or are often used with it in a formula:

LINEST
The
LINEST
formula is used to calculate the statistics for a line by calculating the line's slope and yintercept. It is commonly used to find the bestfit straight line for a given set of data points. 
TREND
The
TREND
formula is used to calculate future values based on historical data. It fits a straight line (using the method of least squares) to the arrays specified in theknown_data_y
andknown_data_x
parameters and then uses that line to calculate new yvalues for the array specified in thenew_data_x
parameter. Ifb
is set to TRUE, then the calculation will include the yintercept of the line. This formula is commonly used in forecasting and trend analysis. 
INTERCEPT
The
INTERCEPT
function calculates the point where the line of best fit for a set of data intercepts the yaxis. This function is commonly used in regression analysis to find the constant b in the equation y=mx+b where m is the slope of the regression line. 
SLOPE
The
SLOPE
formula calculates the slope of the linear regression line that best fits the input data. It is commonly used in statistics to analyze trends and predict future values based on past performance.
Learn More
You can learn more about the FORECAST.LINEAR
Google Sheets function on Google Support.