Free tool
BigQuery pricing calculator
Put in what your projects scan and the slot-hours they use, and see what the same work costs on-demand and on each edition, then compare logical and physical storage billing.
Get your own numbers
Both queries read metadata only. Replace region-us with your location. The first returns the compute inputs for the last 30 days:
SELECT
ROUND(SUM(total_bytes_billed) / POW(1024, 4), 2) AS tib_scanned,
ROUND(SUM(total_slot_ms) / 3600000, 0) AS slot_hours
FROM `region-us`.INFORMATION_SCHEMA.JOBS_BY_PROJECT
WHERE creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
AND job_type = 'QUERY'
AND statement_type != 'SCRIPT';The second returns the storage inputs for the project, in TiB:
SELECT
ROUND(SUM(active_logical_bytes) / POW(1024, 4), 2) AS active_logical,
ROUND(SUM(long_term_logical_bytes) / POW(1024, 4), 2) AS long_term_logical,
ROUND(SUM(active_physical_bytes) / POW(1024, 4), 2) AS active_physical, -- includes time travel
ROUND(SUM(long_term_physical_bytes) / POW(1024, 4), 2) AS long_term_physical,
ROUND(SUM(fail_safe_physical_bytes) / POW(1024, 4), 2) AS fail_safe
FROM `region-us`.INFORMATION_SCHEMA.TABLE_STORAGE;Run both per project, or across the organization with JOBS_BY_ORGANIZATION and TABLE_STORAGE_BY_ORGANIZATION. More queries like these: INFORMATION_SCHEMA.JOBS.
FAQ
How do I estimate my BigQuery cost before running a query?
Run the query as a dry run (bq query --dry_run or the console's query validator) to see the bytes it would process, then multiply by the on-demand price per TiB. On capacity pricing, the cost depends on slot time, which only a real run shows.
Where do I find my slot-hours?
SUM(total_slot_ms) / 3600000 over INFORMATION_SCHEMA.JOBS gives the slot-hours your jobs used. That is what the same work needs under editions, before autoscaler overhead.
Why might my editions bill be higher than this estimate?
The autoscaler adds slots in steps of 50 and bills each for at least a minute unless fluid scaling is on, so billed slot-hours exceed the slot-hours jobs report. Baseline slots and commitments bill every hour whether you use them or not. Set the overhead field to what your reservation shows.
Does the calculator include the free tier?
Compute can include the free first TiB of on-demand queries per billing account (the checkbox). Storage ignores the free 10 GiB per month, which is negligible at these sizes.
