Skip to content
ENExplore Calculators

Compute Engine Cost Calculator

Price a Compute Engine fleet from custom vCPU and memory rates with sustained use, committed use and Spot discounts.

About Compute Engine Cost Calculator

Custom machine types price vCPU and memory on two independent meters, so the hourly rate is a sum rather than a lookup. Sustained use discounts are applied automatically and grow with how much of the month the instance runs — the first quarter of the month earns nothing and the full maximum only lands at a complete month — while committed use discounts and Spot replace the list rate outright. Compute is normally the biggest line on a Google Cloud invoice and the same shape can differ by more than half between on-demand and a 3-year commitment or Spot, so the model you pick matters more than the size you pick. Confirm the current per-vCPU and per-GB rates for your region in the Google Cloud pricing calculator before committing.

Formula

Compute Engine Cost

monthly = instances × (vCPU × vCPU rate + GB × GB rate) × hours × usage share × (1 − discount), where the sustained use discount ramps as max × (usage share − 25%) ÷ 75%.

vCPU rate
Per-vCPU-hour price of the machine family
GB rate
Per-GB-hour memory price, metered separately on custom machine types
usage share
Fraction of the month the instance actually runs
discount
Sustained use, committed use or Spot reduction applied to the list rate

Worked example

With the default values below, Compute Engine Cost Calculator returns Monthly Cost of $339.19. Change any input above and every figure here is recalculated in your browser.

Inputs used

Number of instancesaccepts 1–5,000 VMs
3 VMs
vCPUs per instanceaccepts 1–416 vCPU
4 vCPU
Memory per instanceaccepts 0.5–12,000 GB
16 GB
Price per vCPU-houraccepts 0–10 USD/vCPU-hour
0.0316 USD/vCPU-hour
Price per GB-houraccepts 0–10 USD/GB-hour
0.0042 USD/GB-hour
Hours in the billing monthaccepts 1–744 hours
730 hours
Share of the month the instance runsaccepts 0–100 %
100 %
Pricing modelone of On-demand with automatic sustained use discount, 1-year committed use discount, 3-year committed use discount, Spot (preemptible) VMs
On-demand with automatic sustained use discount
Maximum sustained use discountaccepts 0–30 %
20 %
1-year commitment discountaccepts 0–90 %
37 %
3-year commitment discountaccepts 0–95 %
55 %
Spot discountaccepts 50–91 %
70 %

Results

Monthly Cost
$339.19
On-Demand List Cost
$423.98
Effective Discount
20.0%
Cost per Instance
$113.06
Effective Rate per Instance-Hour
0.1549 USD/hour
vCPU Share of the Rate
65.3%
Annual Cost
$4,070.25

Step by step

  1. 1Values used
  2. 2Compute Engine Cost
  3. 3Monthly Cost= 339.19
  4. 4On-Demand List Cost= 423.98
  5. 5Effective Discount= 20.0
  6. 6Cost per Instance= 113.06
  7. 7Effective Rate per Instance-Hour= $0.1549/hour
  8. 8vCPU Share of the Rate= 65.3

Assumptions and limits

  • The result is derived only from the 12 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is Compute Engine Cost calculated?

monthly = instances × (vCPU × vCPU rate + GB × GB rate) × hours × usage share × (1 − discount), where the sustained use discount ramps as max × (usage share − 25%) ÷ 75%. Custom machine types price vCPU and memory on two independent meters, so the hourly rate is a sum rather than a lookup. Sustained use discounts are applied automatically and grow with how much of the month the instance runs — the first quarter of the month earns nothing and the full maximum only lands at a complete month — while committed use discounts and Spot replace the list rate outright.

Why does Compute Engine Cost matter?

Compute is normally the biggest line on a Google Cloud invoice and the same shape can differ by more than half between on-demand and a 3-year commitment or Spot, so the model you pick matters more than the size you pick. Confirm the current per-vCPU and per-GB rates for your region in the Google Cloud pricing calculator before committing.

What values do I need to enter?

This calculator takes 12 inputs: Number of instances, vCPUs per instance, Memory per instance, Price per vCPU-hour, Price per GB-hour, Hours in the billing month, Share of the month the instance runs, Pricing model, Maximum sustained use discount, 1-year commitment discount, 3-year commitment discount, Spot discount. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Do sustained use and committed use discounts stack?

No. Committed use discounts replace the on-demand rate for the covered resources, so sustained use discounts do not also apply to them. This calculator therefore applies one model at a time, which is how the invoice behaves.

Compute Engine Cost Calculator | Calcrivo