Compute Engine

Virtual machines pricing

This page describes the cost of running a Compute Engine VM instance. To see the pricing for other Google Cloud products, see the Google Cloud pricing list.

View VM prices for your workload and requirements

OptimizationWorkloadsMachine Types

General-purpose

View prices

Best price-performance ratio for a variety of workloads.

Learn more about Google Cloud free VM program for e2-micro VM instance.

Flexible: Best price-performance for balanced and flexible workloads.

N4, N4A, N4D, N2, N2D, N1

Performance: Best performance with advanced capabilities.

C4A, C4, C4D, C3, C3D

Efficient: Lowest cost per core.

E2

Ampere Altra Arm processor

Tau T2A, Tau T2D

Compute-optimized

View prices

Designed for high performance computing (HPC) solutions and compute-intensive workloads.

H4D: HPC workloads and multi-node workloads

H3: HPC workloads

C2D: Memory-bound workloads

C2: Compute-bound workloads

Memory-optimized

View prices

Ideal for memory-intensive workloads, offering more memory per core than other machine families.

X4: Instances from 6TB–32TB of memory.

M4: Instances from 248GB-6TB of memory

M3: Instances from 1TB-4TB of memory

M2: Instances from 6TB-12TB of memory

M1: Instances from 1TB-4TB of memory

Storage-optimized

View prices

Best for workloads that are low in core usage and high in storage density.

Offers the following Local SSD storage capacities using Titanium SSD

Z3

Accelerator-optimized

View prices

Ideal for massively parallelized Compute Unified Device Architecture (CUDA) compute workloads, such as machine learning (ML) and high performance computing (HPC).

Accelerators: Highest performing accelerators.

A4X, A4, A3, A2

Graphics and inference with GPUs:

G4, G2

General-purpose

View prices

Workloads

Best price-performance ratio for a variety of workloads.

Learn more about Google Cloud free VM program for e2-micro VM instance.

Machine Types

Flexible: Best price-performance for balanced and flexible workloads.

N4, N4A, N4D, N2, N2D, N1

Performance: Best performance with advanced capabilities.

C4A, C4, C4D, C3, C3D

Efficient: Lowest cost per core.

E2

Ampere Altra Arm processor

Tau T2A, Tau T2D

Compute-optimized

View prices

Workloads

Designed for high performance computing (HPC) solutions and compute-intensive workloads.

Machine Types

H4D: HPC workloads and multi-node workloads

H3: HPC workloads

C2D: Memory-bound workloads

C2: Compute-bound workloads

Memory-optimized

View prices

Workloads

Ideal for memory-intensive workloads, offering more memory per core than other machine families.

Machine Types

X4: Instances from 6TB–32TB of memory.

M4: Instances from 248GB-6TB of memory

M3: Instances from 1TB-4TB of memory

M2: Instances from 6TB-12TB of memory

M1: Instances from 1TB-4TB of memory

Storage-optimized

View prices

Workloads

Best for workloads that are low in core usage and high in storage density.

Machine Types

Offers the following Local SSD storage capacities using Titanium SSD

Z3

Accelerator-optimized

View prices

Workloads

Ideal for massively parallelized Compute Unified Device Architecture (CUDA) compute workloads, such as machine learning (ML) and high performance computing (HPC).

Machine Types

Accelerators: Highest performing accelerators.

A4X, A4, A3, A2

Graphics and inference with GPUs:

G4, G2

Pricing overview

Compute Engine charges for usage based on the following price sheet. A bill is sent out at the end of each billing cycle, providing a sum of Google Cloud charges. Prices on this page are listed in U.S. dollars (USD).

For Compute Engine, disk size, machine type memory, and network usage are calculated in JEDEC binary gigabytes (GB), or IEC gibibytes (GiB), where 1 GiB is 230 bytes. Similarly, 1 TiB is 240 bytes, or 1024 JEDEC GBs.

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.

This page does not cover pricing for any disk and images, networking, sole tenancy, Confidential VM service, or GPUs used by the VM instance.

FAQ

What is the billing model for all vCPUs, GPUs, and memory resources?

The following billing model applies to all vCPUs, GPUs, and memory resources. The billing model also applies to several premium images that you run on Compute Engine instances.

All vCPUs, GPUs, and GB of memory are charged a minimum of 1 minute. For example, if you run your virtual machine for 30 seconds, you will be billed for 1 minute of usage.

After 1 minute, instances are charged in 1 second increments.

Instance uptime is measured as the number of seconds between when you start an instance and when you stop an instance, the latter being when the instance state is STOPPING. In some cases, your instance can suffer from a failure and be marked as STOPPING by the system; in these cases, you will not be charged for usage after the instance reaches the STOPPING state. If an instance is idle, but still has a state of RUNNING, it will be charged for instance uptime. The easiest way to determine the status of an instance is to use gcloud compute with the gcloud compute instances list command or to visit the Google Cloud console.

In the case of reservations, instance uptime is measured as the number of seconds between when you create a reservation and when you delete that reservation. Reserved resources are billed at standard rates, whether they are started or not.

Note that Compute Engine bills for a minimum of 1 minute of usage, so if you use an instance for 30 seconds of uptime, you are billed for 1 minute. After 1 minute, your instance is billed on a per-second basis. For more information, see the billing model.

Note: If you are a Microsoft licensee with a contract that includes Software Assurance, you might be able to move your existing SQL Server licenses to Compute Engine, instead of paying a per-hour license fee. To find out more information about License Mobility, see the documentation for Using Existing Microsoft Licenses.

Each vCPU and each GB of memory on Compute Engine is billed separately rather than as part of a single machine type. You still create instances using predefined machine types, but your bill reports them as individual vCPUs and memory used per hour. If you change the number of threads per core, you are billed for the number of vCPUs defined by a VM's machine type, not the number of threads used by the VM.

The pricing tables in the machine family and machine type sections on this page describe prices for machine types based on vCPU and memory resources, but also include the calculated cost for each machine type. You can also use the Google Cloud Pricing Calculator to better understand prices for different configurations.

vCPU and memory usage for each machine type use the on-demand price unless that usage qualifies for a discount. vCPU and memory usage for each machine type can receive one of the following discounts:

  • Spot prices: automatic discounts for all Spot VMs (and preemptible VMs), which typically offer the largest discounts—up to 91% off of the corresponding on-demand price—are listed separately on the Spot VMs pricing page.
  • Note: Spot prices can change up to once every 30 days and don't appear in most pricing tables for Compute Engine. For the latest prices, see the Spot VMs pricing page.
  • Committed use discounts (CUDs): up to a 70% discount for memory-optimized machine types and up to a 55% discount for all other machine types.
  • Sustained use discounts (SUDs): automatic discount of up to 30% on resources that are used for more than 25% of a month and are not receiving any other discounts.

Discount types cannot be combined. For more information, see Order of discount application.

Spot prices are variable and can change up to once every day, but provide discounts of up to 91% off of the corresponding default price for many machine types, GPUs, TPUs, and Local SSDs. Spot prices are automatically applied to all Spot VMs and preemptible VMs. However, Compute Engine can preempt Spot VMs and preemptible VMs at any time, so they are only recommended for fault-tolerant applications that can handle VM preemption.

For the latest prices, see the Spot VMs pricing page.

For more information, see the documentation for Spot VMs.

Compute Engine offers resources at deeply discounted prices in return for purchasing committed use contracts (also known as commitments). When you purchase a commitment, you commit either to a minimum amount of resource usage or to a minimum spend amount for a specified term of one or three years.

Depending on your resource usage requirements, you can purchase 1-year or 3-year commitments and receive CUDs for Compute Engine resources in either of the following ways:

  • Resource-based committed use discounts: You receive these CUDs when you purchase a resource-based commitment and commit to use a minimum level of Compute Engine resources in a particular region.
  • Compute flexible committed use discounts: You avail Compute flexible CUDs when you purchase a spend-based Compute flexible commitment and commit to a minimum amount of hourly spend.

Compute Engine offers a flat committed use discount percentage on its VMs across all regions. When you purchase vCPUs, memory, or both on a 1-year commitment, you get the resources at a discount of 37% over the on-demand prices. When you purchase your resources on a 3-year commitment, the discount increases to 70% over the on-demand prices for memory-optimized machine types and to 55% over the on-demand prices for all other machine types.

Resource-based CUDs are available for the following machine types in each machine family, with the exception of Memory Optimized Upgrade Premium SKUs:

  • General purpose:
  • All general purpose machine types except for N1 shared-core machine types
  • All N1, N2, N2D, N4, C3, C3D, C4, C4A and C4D sole-tenant nodes
  • Memory-optimized:
  • All M1, M2, M3, machine types
  • All M1, M2, M3, sole-tenant node types
  • Compute-optimized:
  • All compute-optimized (C2, C2D, and H3) machine types
  • All C2 and H3 sole-tenant node types
  • Storage-optimized:
  • All Z3 machine types
  • Accelerator-optimized:
  • All A2, A3, and G2 machine types
  • All G2 sole-tenant node types

For a more detailed breakdown, see Commitment types.



A commitment provides a 1- or 3-year discounted price agreement, but it does not reserve capacity in a specific zone. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. To get zonal resources at discounted prices and also ensure that capacity is reserved for them, you must do both of the following: purchase commitments and create reservations for those zonal resources.

You can also attach reservations to your resource-based commitments to ensure that Compute Engine reserves capacity for your committed resources. When you commit to GPU or Local SSD resources, you must also reserve those resources and attach those reservations to your commitment.

For more information, see Combine reservations with committed use discounts.

To learn how to purchase resource-based commitments, see the following:

Purchase commitments without attached reservations

Purchase commitments with attached reservations

After you purchase a resource-based commitment, you're billed monthly for your commitment and must pay your monthly commitment fee even if you don't use all of your committed resources. Your commitment fee is the sum of the discounted prices of all your committed resources. Compute Engine calculates the discounted price of each resource by using its prevailing on-demand price on the day your commitment becomes active. Your monthly commitment fee and the discounted prices for your resources stay the same until the end of your commitment term, even if the on-demand prices change.

If you use your commitments to run custom machine types, then Compute Engine charges a 5% premium over the commitment prices. Compute Engine charges this premium for the portion and duration of your commitment that you run these custom machine type VMs.

Note: If you merge or split your commitments, then the discounted prices for your committed resources might change on the day your merged or split commitments become active.

Compute flexible CUDs are spend-based CUDs that you receive when you commit to a minimum amount of hourly spend on one or more of the following services:

  • Compute Engine
  • Google Kubernetes Engine
  • Cloud Run

For Compute Engine, you can receive flexible CUDs for your vCPU and memory usage in any of the projects within your Cloud Billing account, across any region, and belonging to any eligible machine types.

You purchase flexible commitments for your Cloud Billing account and commit to a minimum hourly spend amount across these products for a 1-year or 3-year term duration. Specifically, you commit to spend on eligible resources or services that are worth a specified minimum amount of on-demand price, per hour, throughout the commitment's term. Depending on your commitment's term, you receive the following CUDs on that minimum hourly spend amount:

  • A 28% discount over your committed hourly spend amount for a 1-year commitment
  • A 46% discount over your committed hourly spend amount for a 3-year commitment

Note: The discounts that you receive may differ for Cloud Billing accounts that have other on-demand VM savings in effect.

Your commitment becomes active within the first hour of its purchase. This discounted committed spend amount becomes your hourly commitment fee. In return, you receive hourly credits on your Cloud Billing account that are worth your total committed spend amount. Google Cloud uses these credits to offset your hourly spend on usage that is eligible for flexible CUDs. At the end of each month, Google Cloud calculates your total commitment fee for that month and bills you that amount.

Your hourly commitment fee remains your minimum hourly expenditure throughout the commitment term and you have to pay it even if you don't use resources whose on-demand prices total up to your committed hourly spend. Your commitment fee remains the same even if the on-demand prices for your resources change during your commitment term.

Important: A single flexible commitment covers your eligible spend across Compute Engine, GKE, and Cloud Run . For any given flexible commitment, the credits from flexible CUDs that you receive are distributed across these services in proportion to their individual eligible spend amounts. Depending on whether your Google Cloud usage is limited to Compute Engine or also spans across these other services, you might see differences in the flexible CUD credits that you receive for your commitment.

For Compute Engine, only memory and vCPUs of the following machine series are eligible for flexible CUDs. For every listed machine series, all available machine types and sole-tenant node types are eligible.

  • General purpose: C3, C3D, C4, C4A, C4D, E2, N1, N2, N2D, N4, N4, N4D, and N4A (In Preview; CUDs available at GA) machine series
  • Compute-optimized:
  • H3 and H4D machine series (Available only after opting in to the new model)
  • C2 and C2D machine series
  • Memory-optimized: M1, M2, M3, and M4 machine series (Available only after opting in to the new model)
  • Storage-optimized: Z3 machine series

For more information, see the following documents:

To learn more about flexible CUDs, see Compute flexible CUDs.

  • To learn how to purchase spend-based commitments, see Purchasing spend-based commitments.
  • To view the full list of Compute Engine SKUs that are eligible for flexible CUDs, see Compute flexible CUDs eligible SKUs.
  • To learn how to view, analyze, and manage your spend-based commitments, see Analyze the effectiveness of flexible commitments.

Compute Engine offers sustained use discounts (SUDs) on resources that are used for more than 25% of a billing month and are not receiving any other discounts. Whenever you use an applicable resource for more than a fourth of a billing month, you automatically receive a discount for every incremental hour that you continue to use that resource. The discount increases incrementally with usage and you can get up to a 30% net discount off of the resource cost for virtual machine (VM) instances that run the entire month.

Compute Engine automatically calculates and applies SUDs to resource usage within a Cloud Billing account, so there is no action required on your part to enable these discounts.

You receive SUDs in the form of monthly credits. At the end of every month, for every eligible Compute Engine resource that you use, you receive applicable SUDs as credits based on the duration of time for which you used that resource. Any credits that you receive for your SUDs have no cash value. Compute Engine uses these credits to offset your monthly resource usage costs. You can't store or use these credits beyond the month in which you receive them.

To learn more about sustained use discounts, see the SUDs documentation.

You can view all your earned credits during a particular month in the cost table report for your Cloud Billing account on the Google Cloud console. To learn more about credits and how to view them, see View and analyze your credits.

You can purchase both resource-based and flexible commitments to cover Compute Engine resources for projects within your Cloud Billing account. However, the discount types that Google Cloud offers on your Compute Engine resources are mutually exclusive and can't be combined. At any given point, a resource is eligible for only one kind of discount. If you're receiving a specific type of discount for a portion of your resource usage, then that portion of usage doesn't qualify for any other type of discount.

You can use your resource-based commitments to cover your predictable and stable resource usage that is specific to a project, region, and a machine series. You can use flexible commitments to cover any resource usage that isn't specific to any one machine series, project, or region. If you purchase both resource-based commitments and flexible commitments for your Compute Engine resources, then Google Cloud optimizes the use of your commitments, on an hourly basis, in the following way:

Google Cloud first utilizes your resource-based commitments and applies all the resulting resource-based CUDs to any eligible hourly usage.

Google Cloud then utilizes your spend-based commitments and applies all the resulting flexible CUDs to any remaining eligible on-demand usage.

After utilizing all of your commitments, Google Cloud uses the on-demand rates to charge any additional hourly usage. This overage hourly usage might be eligible for any applicable SUDs.

Additionally, spot prices apply to all Spot VMs (and preemptible VMs), so Spot VMs (and preemptible VMs) cannot receive CUDs or SUDs.

The pricing tables in the machine family and machine type sections on this page compare the on-demand prices for machine types in each machine family with the discounted prices for each of the following:

  • Spot VMs (and preemptible VMs)
  • 1-year resource-based commitments
  • 3-year resource-based commitments
  • 1-year flexible CUD consumption rates
  • 3-year flexible CUD consumption rates

The Google Cloud console provides a transaction history for each of your projects. This history describes your current balance and estimated resource usage for that particular project.

To view a project's transaction history, go to the estimated billing invoice page.

Google Cloud