Cloud Functions are priced according to how long your function runs, how many times it's invoked and how many resources you provision for the function. If your function makes an outbound network request, there are also additional data transfer fees. Cloud Functions includes a perpetual free tier to allow you to experiment with the platform at no charge. Note that even for free tier usage, we require a valid billing account.

All prices quoted are in US Dollars. When charging in local currency, Google will convert the prices listed into applicable local currency pursuant to the conversion rates published by leading financial institutions.

Cloud Functions Pricing

This section provides details about Cloud Functions pricing.


Function invocations are charged at a flat rate, independent of the source of the invocation, including functions invoked from an HTTP request (HTTP functions), background functions, and invocations resulting from the call API.

Invocations per Month Price/Million
First 2 million Free
Beyond 2 million $0.40

Invocations are charged at a per-unit rate of $0.0000004 per invocation, excluding the first 2 million free invocations per month and are charged regardless of the outcome of the function or its duration.

Compute Time

Compute time is measured from the time your function receives a request to the time it completes, either through you signaling completion, or through a timeout, other failure or any other termination. Compute time is measured in 100ms increments, rounded up to the nearest increment. For example, a function executing for 260ms would be billed as 300ms.

Fees for compute time are variable based on the amount of memory and CPU provisioned for the function. Units used in this calculation are:

  • GB-Seconds

    • 1 GB-second is 1 second of wallclock time with 1GB of memory provisioned
  • GHz-Seconds

    • 1 GHz-second is 1 second of wallclock time with a 1GHz CPU provisioned

Disk size, memory, and network usage are calculated in gigabytes (GB), where 1GB is 2^30 bytes. This unit of measurement is also known as a gibibyte (GiB). 1GHz is considered as 10^9 Hertz:

Cloud Functions can be provisioned as one of 5 types:

Memory CPU1 Price/100ms
128MB 200MHz $0.000000231
256MB 400MHz $0.000000463
512MB 800MHz $0.000000925
1024MB 1.4 GHz $0.000001650
2048MB 2.4 GHz $0.000002900

1 CPU allocations are an approximation. Actual allocation of CPU clock cycles may vary slightly across function invocations.

More generally, the cost one second of compute time is as follows:

Unit Price
GB-Second $0.0000025
GHz-Second $0.0000100

Free Tier

Cloud Functions provides a perpetual free tier for compute-time resources, which includes an allocation of both GB-seconds and GHz-seconds. In addition to the 2 million invocations, the free tier provides 400,000 GB-seconds, 200,000 GHz-seconds of compute time and 5GB of Internet egress traffic per month. Note that even for free tier usage, we require a valid billing account.


Outbound data transfer (that is, data transferred from your function out to somewhere else) is measured in GB and charged at a flat rate. Inbound data, and outbound data to other Google APIs in the same region is free. Where the Google API you are using is a global (i.e. there is no region), it is considered to be the same region.

Type Price/GB
Outbound Data (Egress) $0.12
Outbound Data per month 5GB Free
Inbound Data (Ingress) Free
Outbound Data to Google APIs in the same region Free

Local Disk

Cloud Functions provides access to a local disk mount point (/tmp) which is known as a "tmpfs" volume in which data written to the volume is stored in memory. There is no specific fee associated with this however writing data to the /tmp mountpoint will consume memory resources provisioned for the function.

Pricing Examples

This section provides some pricing examples.

Simple Background Function

A simple background function with 128MB of memory and a 200MHz CPU, invoked 10 million times per month and running for 300ms each time using only Google APIs (no billable egress).




Compute Time

(128/1024) x 0.3s = 0.0375 GB-seconds per invocation

(200/1000) x 0.3s = 0.0600 GHz-seconds per invocation

10,000,000 x 0.0375 = 375,000 GB-seconds per month

10,000,000 x 0.0600 = 600,000 GHz-seconds per month



Metric Gross Value Free Tier Net Value Unit Price Total Price
Invocations 10,000,000 2,000,000 8,000,000 $0.0000004 $3.20
GB-seconds 375,000 400,000 < 0 $0.0000025 $0.00
GHz-seconds 600,000 200,000 400,000 $0.0000100 $4.00
Networking 0 5 0 $0.12 $0.00
Total / Month $7.20

High Volume HTTP Function

A medium complexity HTTP Function with 256MB of memory and a 400MHz CPU, invoked 50 million times per month via HTTP, running for 500ms each time and sending 5KB of data back to the caller (5KB egress per invocation).




Compute Time

(256/1024) x 0.5s = 0.125 GB-seconds per invocation

(400/1000) x 0.5s = 0.200 GHz-seconds per invocation

50,000,000 x 0.125 = 6,250,000 GB-seconds per month

50,000,000 x 0.200 = 10,000,000 GHz-seconds per month


50,000,000 x (5 / 1024 / 1024) = 238.42 GB of egress traffic per month

Metric Gross Value Free Tier Net Value Unit Price Total Price
Invocations 50,000,000 2,000,000 48,000,000 $0.0000004 $19.20
GB-seconds 6,250,000 400,000 5,850,000 $0.0000025 $14.63
GHz-seconds 10,000,000 200,000 9,800,000 $0.0000100 $98.00
Networking 238.42 5 233.42 $0.12 $28.01
Total / Month $159.84

Send feedback about...

Cloud Functions Documentation