Request a demo

Glossary · BigQuery

What is BigQuery on-demand pricing?

BigQuery on-demand pricing bills each query for the bytes it processes: $6.25 per TiB in the US multi-region, with the first 1 TiB per month free. It is the default compute model; you pay nothing for idle time, and each project gets up to 2,000 concurrent slots.

Also called: on-demand, pay per query, per-TiB pricing, analysis pricing, bytes billed

How the charge is calculated

On-demand is the default: any project without a reservation assignment pays per byte processed. The list price is $6.25 per TiB in the US multi-region, and the first 1 TiB each month is free. A few rules decide what counts:

  • BigQuery stores data by column, so you pay for the columns a query reads, in the partitions and blocks it cannot skip.
  • Charges are rounded up to the nearest MB, with a minimum of 10 MB per table referenced and 10 MB per query.
  • LIMIT does not reduce the bytes billed, and SELECT * reads every column.
  • Queries on shared data are billed to the project that runs them, not to the data owner.

A worked example: reading two columns that hold 300 GiB of a 2 TiB table costs about $1.83 (300 / 1,024 TiB x $6.25). SELECT * on the same table costs $12.50.

Failed queries and cache hits are free. So are batch loads and exports that run in the shared slot pool, table copies and deletes, though you pay to store what they create.

Slots you get, and when you get them last

On-demand includes compute: up to 2,000 concurrent slots per project, with short bursts above, and a 20,000-slot cap shared by an organization's on-demand projects. When a region is short of capacity, BigQuery serves Enterprise and Enterprise Plus capacity first; on-demand and Standard edition requests are the most likely to wait.

See what on-demand costs in INFORMATION_SCHEMA

total_bytes_billed in INFORMATION_SCHEMA.JOBS is the billed amount for on-demand jobs, and on-demand query jobs have no reservation_id. Google's billing groups jobs by end time in Pacific time, so this query does too:

SELECT
  EXTRACT(DATE FROM end_time AT TIME ZONE 'America/Los_Angeles') AS billing_day,
  user_email,
  COUNT(*) AS queries,
  ROUND(SUM(total_bytes_billed) / POW(1024, 4), 3) AS tib_billed,
  ROUND(SUM(total_bytes_billed) / POW(1024, 4) * 6.25, 2) AS approx_usd
FROM `region-us`.INFORMATION_SCHEMA.JOBS
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
  AND job_type = 'QUERY'
  AND state = 'DONE'
  AND statement_type != 'SCRIPT' -- avoid counting scripts twice
  AND reservation_id IS NULL     -- on-demand jobs only
GROUP BY billing_day, user_email
ORDER BY approx_usd DESC
LIMIT 20;

The estimate ignores the free TiB. Group by query_info.query_hashes.normalized_literals instead of user_email to find the recurring query shapes behind the spend.

Controls and cheaper alternatives

FAQ

Does LIMIT reduce BigQuery on-demand cost?

No. On-demand charges follow the data processed in the columns the query reads, even with an explicit LIMIT on the result. Select fewer columns, filter on the partitioning column or query a smaller table instead.

Am I charged for failed or cached BigQuery queries?

Not on demand: queries that return an error and queries answered from the results cache are free. Cancelling a running query is different, because it can still be billed up to the full cost of the query.

How do I put a hard cap on on-demand spend?

Set maximum bytes billed on queries, so a query whose estimate exceeds the limit fails before it runs and costs nothing, and set custom quotas on bytes processed per day per project or per user. Budgets and alerts only notify; these two stop the query.

Read next

Browse the full glossary

Cut BigQuery spend without guessing

Masthead attributes compute and storage cost to every project, user, pipeline and table, finds unused and dead-end tables, and shows where editions or on-demand pricing is cheaper. Mnemonic cut its BigQuery compute cost by 20% within 24 hours of onboarding.