Google Cloud Functions Cost Calculator
Simulate GCP serverless compute bills with Google Cloud Functions 2nd Gen ($0.40 per 1M requests + compute).
Parameters & Config
Total function executions triggered per month
RAM allocated to the serverless container
Average latency per execution in milliseconds
Cloud provider fee per 1,000,000 invocation requests
Charge per GB-second of compute runtime consumed
Combined monthly charge for invocations and compute runtime
Blended cost to execute 1,000,000 function requests
Key Metrics & Sub-Totals
3 itemsCalculation Summary & Unit Breakdown
| Metric | Calculated Value | Notes / Logic |
|---|---|---|
| Monthly Invocations | 5,000,000 | requests/month |
| Allocated Function Memory | 256 MB | 0.250 GB |
| Average Execution Duration | 150 ms | per call |
| Total Compute Volume | 187,500 GB-s | GB-seconds |
| Request Surcharge | $2.00 | Invocation fee |
| Compute Runtime Charge | $3.09 | Memory-duration fee |
| Effective Cost per 1M Calls | $1.02 | Blended rate |
| Total Monthly Cloud Bill | $5.09 | USD |
Overview & Methodology
Google Cloud Functions (2nd Gen, powered by Cloud Run and Knative) charges $0.40 per 1,000,000 invocations plus Tier 1 compute rates ($0.0000165/GB-second and $0.000024/vCPU-second).
Mathematical Formulation
Total GCP Bill = (Invocations / 1M × $0.40) + (GB-s × $0.0000165).Optimization Best Practices
GCP Free Tier includes 2,000,000 invocations, 400,000 GB-seconds, and 200,000 GHz-seconds of compute free every month.
2nd Gen functions support up to 60-minute execution times for heavy background ETL workloads.
Enable minimum instances to eliminate cold start latency for critical user-facing endpoints.
Frequently Asked Questions
Q.How much does 5,000,000 executions cost on Google Cloud Functions?
5M calls at 256MB and 150ms cost $2.00 for invocations plus $3.09 for compute (187,500 GB-s), totaling $5.09.
Q.What is the GCP serverless free tier allowance?
GCP provides 2M invocations and 400,000 GB-seconds free each month across Cloud Functions and Cloud Run.
Q.What is the difference between 1st Gen and 2nd Gen Cloud Functions?
2nd Gen runs on Cloud Run, offering larger concurrency (up to 1,000 requests per instance), 60-minute timeouts, and faster cold starts.