Google Cloud Tutorial · Google Cloud Basics · Lesson 5 of 27

Billing, Pricing and Discounts

How Google Cloud billing works: billing accounts, budgets, and the discounts that change what you pay.

Members can save this page, take notes and track progress. See membership · Sign in

Billing accounts and budgets

A billing account pays for one or more projects. Budgets send alerts at thresholds (50%, 90%, 100% of a monthly amount); they don't stop spending by themselves, though a budget can publish to Pub/Sub so automation can act. Export billing data to BigQuery to analyse costs by project, service and label.

Discounts

  • Sustained use discounts: applied automatically to some VM machine families that run most of the month.
  • Committed use discounts (CUDs): commit to resources or spend for one or three years in exchange for a large discount; best for steady base load.
  • Spot VMs: spare capacity at a large discount (Google quotes 60-91%) that can be reclaimed at any time; good for batch jobs, CI and fault-tolerant workers.
  • Free tier: small always-free amounts (for example some Cloud Run requests and BigQuery queries each month).
Comparing pricing options for one VM (illustrative rates)Try it yourself
hours = 730                                    # hours in an average month
on_demand_rate = 0.20                          # $/hour for an example machine type
options = {
    "on-demand, always on": on_demand_rate * hours,
    "1-year commitment (~37% off)": on_demand_rate * (1 - 0.37) * hours,
    "3-year commitment (~55% off)": on_demand_rate * (1 - 0.55) * hours,
    "Spot (~70% off, may be reclaimed)": on_demand_rate * (1 - 0.70) * hours,
    "on-demand, office hours only (50 h/week)": on_demand_rate * 50 * 52 / 12,
}
for name, monthly in options.items():
    print(f"{name:42} ${monthly:8.2f}/month")

Output

on-demand, always on                       $  146.00/month
1-year commitment (~37% off)               $   91.98/month
3-year commitment (~55% off)               $   65.70/month
Spot (~70% off, may be reclaimed)          $   43.80/month
on-demand, office hours only (50 h/week)   $   43.33/month

Costs people forget

Network egress to the internet and between regions, Cloud NAT and load balancer processing, log ingestion and retention, idle static IPs, unattached disks and snapshots.

Test yourself

What happens when a project reaches 100% of its budget?

  1. All resources are deleted
  2. Billing is paused automatically
  3. Alerts are sent; spending continues unless you add automation to stop it
  4. The project is moved to the free tier
Show answer

Answer: Alerts are sent; spending continues unless you add automation to stop it

Budgets notify; they don't cap spend on their own.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake