Skip to content
Calcrivo

Compute Engine Cost Calculator

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

Inputs

VMs
vCPU
GB
USD/vCPU-hour

N2 custom machine types list at roughly $0.0316 per vCPU-hour in us-central1.

USD/GB-hour

Custom machine types bill memory on its own meter, roughly $0.0042 per GB-hour.

hours
%

Sustained use discounts ramp with this figure and only reach the maximum at a full month.

%

N1 reaches 30% for a full month; N2, N2D and C2 reach about 20%.

%
%
%

Spot capacity runs 60–91% below on-demand and can be reclaimed with 30 seconds notice.

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.1549USD/hour

vCPU Share of the Rate

65.3%

Annual Cost

$4,070.25

Step by step

  1. Values used

    Number of instances = 3 VMs; vCPUs per instance = 4 vCPU; Memory per instance = 16 GB; Price per vCPU-hour = 0.0316 USD/vCPU-hour; Price per GB-hour = 0.0042 USD/GB-hour; Hours in the billing month = 730 hours; Share of the month the instance runs = 100 %; Pricing model = On-demand with automatic sustained use discount; Maximum sustained use discount = 20 %; 1-year commitment discount = 37 %; 3-year commitment discount = 55 %; Spot discount = 70 %

  2. 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%.

  3. Monthly Cost

    = 339.19

  4. On-Demand List Cost

    = 423.98

  5. Effective Discount

    = 20.0

  6. Cost per Instance

    = 113.06

  7. Effective Rate per Instance-Hour

    = 0.1549 USD/hour

  8. vCPU Share of the Rate

    = 65.3

How it works

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

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.

You might also need