Cloud Functions are free for most small-to-medium apps — but they require the Blaze plan. Here's exactly what you pay, when you pay it, and the hidden cost most developers miss.
Cloud Functions will not deploy or run on the Spark free plan. You must upgrade to Blaze to use them. Upgrading is free and preserves all Spark free tier quotas — see the Spark vs Blaze guide for details.
The Blaze plan includes a generous monthly free allocation for Cloud Functions. Most small to medium apps never exceed it.
| Billable unit | Free tier (Blaze monthly) | Price beyond free tier |
|---|---|---|
| Invocations | 2,000,000 / month | $0.40 per 1,000,000 |
| Compute time — memory | 400,000 GB-seconds | $0.0000025 per GB-second |
| Compute time — CPU | 200,000 GHz-seconds | $0.00001 per GHz-second |
| Outbound egress | 5 GB / month | $0.12 per GB |
| Inbound data | Always free | Always free |
Firebase supports two generations of Cloud Functions. Google recommends v2 for new deployments. The pricing models differ slightly, but the free tier is comparable.
Data leaving your functions costs money beyond 5 GB/month. Every response payload, every external API call response, every file returned — counts as egress at $0.12/GB after the first 5 GB. Serving images or large JSON from Cloud Functions instead of directly from Cloud Storage URLs is a common mistake that doubles bandwidth cost.
Example: A function that returns a 50 KB JSON payload, called 200,000 times/month: