Forecasting overview

Forecasting is a technique where you analyze historical data in order to make aninformed prediction about future trends. For example, you might analyzehistorical sales data from several store locations in order to predict futuresales at those locations. In BigQuery ML, you perform forecasting ontime series data.

You can perform forecasting in the following ways:

  • By using theAI.FORECAST functionwith the built-inTimesFM model. Use this approach when youneed to forecast future values for a single variable. This approach doesn't require you to createand manage a model.
  • By using theML.FORECAST functionwith theARIMA_PLUS model.Use this approach when you need to run an ARIMA-based modeling pipeline anddecompose the time series into multiple components in order to explain theresults. This approach requires you to create and manage a model.
  • By using theML.FORECAST function with theARIMA_PLUS_XREG model.Use this approach when you need to forecast future values for multiplevariables. This approach requires you to create and manage a model.

In addition to forecasting, you can useARIMA_PLUS andARIMA_PLUS_XREGmodels for anomaly detection. For more information, see the followingdocuments:

CompareARIMA_PLUS models and the TimesFM model

Use the following table to determine whether to use TimesFM,ARIMA_PLUS, orARIMA_PLUS_XREG model for your use case:

Model typeARIMA_PLUS andARIMA_PLUS_XREGTimesFM
Model detailsStatistical model that uses theARIMA algorithm for the trend component, and a variety of other algorithms for non-trend components. For more information, seeTime series modeling pipeline and publication below.Transformer-based foundation model. For more information, see the publications in the next row.
PublicationARIMA_PLUS: Large-scale, Accurate, Automatic and Interpretable In-Database Time Series Forecasting and Anomaly Detection in Google BigQueryA Decoder-only Foundation Model for Time-series Forecasting
Training requiredYes, oneARIMA_PLUS orARIMA_PLUS_XREG model is trained for each time series.No, the TimesFM model is pre-trained.
SQL ease of useHigh. Requires aCREATE MODEL statement and a function call.Very high. Requires a single function call.
Data history usedUses all time points in the training data, but can be customized to use fewer time points.Uses 512 time points.
AccuracyVery high. For more information, see publications listed in a previous row.Very high. For more information, see publications listed in a previous row.
CustomizationHigh. TheCREATE MODEL statement offers arguments that let you tune many model settings, such as the following:
  • Seasonality
  • Holiday effects
  • Step changes
  • Trend
  • Spikes and dips removal
  • Forecasting upper and lower bounds
Low.
Supports covariatesYes, when using theARIMA_PLUS_XREG model.No.
ExplainabilityHigh. You can use theML.EXPLAIN_FORECAST function to inspect model components.Low.
Best use cases
  • You want full control of the model including customization.
  • You need explainability for model output.
  • You want minimal setup -- doing forecast without creating a model first.

Recommended knowledge

By using the default settings of BigQuery ML's statements andfunctions, you can create and use a forecasting model evenwithout much ML knowledge. However, having basic knowledge aboutML development, and forecasting models in particular,helps you optimize both your data and your model todeliver better results. We recommend using the following resources to developfamiliarity with ML techniques and processes:

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.