BigQuery pricing

Always free usage limits

As part of the Google Cloud Free Tier, BigQuery offers some resources free of charge up to a specific limit. These free usage limits are available during and after the free trial period. If you go over these usage limits and are no longer in the free trial period, you will be charged according to the pricing on this page.

Resource Monthly free usage limits Details
Storage The first 10 GB per month is free. BigQuery ML models and training data stored in BigQuery are included in the BigQuery storage free tier.
Queries (analysis) The first 1 TB of query data processed per month is free. Queries that use BigQuery ML prediction, inspection, and evaluation functions are included in the BigQuery analysis free tier. BigQuery ML queries that contain CREATE MODEL statements are not.
BigQuery flat-rate pricing is also available for high-volume customers that prefer a stable, monthly cost.
BigQuery Storage Write API (Preview) The first 2 TB per month are free. For more information, see Data ingestion pricing.
BigQuery ML CREATE MODEL queries The first 10 GB of data processed by queries that contain CREATE MODEL statements per month is free. BigQuery ML CREATE MODEL queries are independent of the BigQuery analysis free tier, and only apply to BigQuery ML built-in models (models that are trained within BigQuery).

BigQuery ML pricing

BigQuery ML models can be classified into two different categories: built-in models and external models. BigQuery ML built-in models are trained within BigQuery, such as linear regression, logistic regression, kmeans, matrix factorization, and time series models. BigQuery ML external models are trained utilizing other Google Cloud services, DNN and boosted tree models (which are trained on Vertex AI) and AutoML models (which are trained on the AutoML Tables backend). BigQuery ML model training pricing is based on the model type as well as your usage pattern: flat-rate or on-demand. BigQuery ML prediction and evaluation functions are executed within BigQuery ML for all model types, priced as explained below.

BigQuery ML flat-rate pricing

BigQuery offers flat-rate pricing for high-volume or enterprise customers who prefer a stable monthly cost rather than paying the on-demand price for model creation, evaluation, inspection, and prediction.

Customers can use reservations to train in BigQuery ML models. And the BigQuery ML costs are included in the monthly BigQuery flat-rate price.

Reservations to create built-in models

BigQuery has three job types for reservation assignment: QUERY, PIPELINE, and ML_EXTERNAL. QUERY assignments, which are used for analytical queries, are also used to run CREATE MODEL queries for BigQuery ML built-in models. Built-in model training and analytical queries share the same pool of resources in their assigned reservations, and have the same behavior regarding being preemptible, and using idle slots from other reservations.

Reservations to create external models

Because external models are trained outside of BigQuery, these workloads are not preemptible. As a result, to ensure other workloads are not impacted, only reservations with ML_EXTERNAL job type assignment can be used for these external jobs. Reservations workload management describes how to create reservations for external model training jobs. The slots usage per job is calculated to maintain the price parity between BigQuery slot and external Google Cloud service costs.

BigQuery ML on-demand pricing

BigQuery ML pricing for on-demand queries depends on the type of operation: model type, model creation, model evaluation, model inspection, or model prediction.

BigQuery ML on-demand pricing is as follows:

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

1 The CREATE MODEL statement stops at 50 iterations for iterative models. This applies to both on-demand and flat-rate pricing.

2 For time series models, when auto-arima is enabled for automatic hyper-parameter tuning, multiple candidate models are fitted and evaluated during the training phase. In this case, the number of bytes processed by the input SELECT statement is multiplied by the number of candidate models, which can be controlled by the AUTO_ARIMA_MAX_ORDER training option. This applies to both on-demand and flat-rate pricing. The following notes apply to time series model creation:

  • For single time series forecasting with auto-arima enabled, when AUTO_ARIMA_MAX_ORDER is (1, 2, 3, 4, 5), the number of candidate models is (6, 12, 20, 30, 42) respectively if non-seasonal d equals one; otherwise, the number of candidate models is (3, 6, 10, 15, 21).

  • For multiple time series forecasting using TIME_SERIES_ID_COL, the charge is for (6, 12, 20, 30, 42) candidate models when AUTO_ARIMA_MAX_ORDER is (1, 2, 3, 4, 5) respectively.

  • Note that this model selection only applies to model creation. For model evaluation, inspection, and prediction, only the selected model is used, with regular query pricing.

BigQuery ML dry run

Due to the nature of the underlying algorithms of some model types and differences in billing, the bytes processed will not be calculated for some model types until after training is completed due to the complexity of calculating the initial estimate.

BigQuery ML pricing example

BigQuery ML charges are not itemized separately on your billing statement. For current models, if you have a BigQuery flat-rate plan, BigQuery ML charges are included.

If you are using on-demand pricing, BigQuery ML charges are included in the BigQuery analysis (query) charges.

BigQuery ML jobs that perform inspection, evaluation, and prediction operations incur the same charges as on-demand query jobs. Because CREATE MODEL queries incur different charges, you must calculate CREATE MODEL job costs independently by using the Cloud logging audit logs. Using the audit logs, you can determine the bytes billed by the BigQuery ML service for each BigQuery ML CREATE MODEL job. Then, multiply the bytes billed by the appropriate cost for CREATE MODEL queries in your regional or multi-regional location.

For example, to determine the cost of a query job in the US that includes a BigQuery ML CREATE MODEL statement:

  1. Open the Cloud Logging page in the Google Cloud console.

  2. Verify that the product is set to BigQuery.

  3. Click the drop-down arrow in the "Filter by label or text search" box and choose Convert to advanced filter. This adds the following text to the filter:

  4. Add the following text on line two below the resource.type line:

  5. To the right of the Submit Filter button, choose the appropriate time frame from the drop-down list. For example, choosing Last 24 hours would display BigQuery ML CREATE MODEL jobs completed in the past 24 hours.

  6. Click Submit Filter to display the jobs completed in the given time window.

  7. After the data is populated, click View Options and choose Modify custom fields.

  8. In the Add custom fields dialog, enter:

  9. Click Save to update the results.

  10. After the page is updated, the bytes billed by each BigQuery ML job appear to the right of the job's timestamp. If the bytes billed are included in the free tier, no value appears. For example:

    BigQuery ML bytes billed

  11. To calculate the charges for the BigQuery ML CREATE MODEL job, multiply the bytes billed by the BigQuery ML on-demand price. In this example, the CREATE MODEL job processed 100873011200 bytes. To calculate the cost of this job in the US multi-regional location, divide the billed bytes by the number of bytes per TB, and multiply it by the model creation cost:

    100873011200/1099511627776 x $250.00 = $22.94

What's next

Request a custom quote

With Google Cloud's pay-as-you-go pricing, you only pay for the services you use. Connect with our sales team to get a custom quote for your organization.
Contact sales