Home / Dev & AI / Cloud Cost / Serverless Cost Calculator

Cloud Cost

Serverless Cost Calculator

Estimate serverless cost on any platform. Enter invocations, duration and memory, set the request and compute rates for AWS, GCP, Azure or Cloudflare, and see the monthly bill.

Estimated monthly cost

$0

Request cost
Compute cost (GB-seconds)
GB-seconds used
Cost per 1M invocations
Annual estimate

Requests vs compute

Short, light functions are request-bound, long or memory-heavy ones flip to compute-bound.

Cost as invocations grow

Projected monthly spend at 2x, 5x and 10x volume.

What the Serverless Cost Calculator does

Serverless, or function as a service, lets you run code without provisioning servers and pay only for what executes. Every major platform, AWS Lambda, Google Cloud Functions, Azure Functions and Cloudflare Workers, bills on the same two axes: the number of invocations and compute measured in GB-seconds, which is memory allocated times run time.

This serverless cost calculator is provider neutral. Set the request price and compute price to match whichever platform you use, enter your invocations, duration and memory, and it computes GB-seconds and the total. That makes it easy to compare platforms on the same workload and see which is cheapest for your traffic.

Heads up on pricing. The rates built into this tool are public list estimates for July 2026 and can change without notice. Providers also offer batch discounts, prompt caching and volume tiers that lower real costs, so treat the output as a planning estimate, not a quote.

The formula

GB-seconds = invocations × (duration ÷ 1000) × (memory ÷ 1024)
cost = (invocations ÷ 1M × request price) + (GB-seconds × compute price)

Worked example

For 10,000,000 invocations at 200 ms and 512 MB, GB-seconds is 10,000,000 × 0.2 × 0.5 = 1,000,000. At $0.20 per million requests and $0.0000166667 per GB-second, that is $2 + $16.67 = about $18.67 a month before any free tier.

Ways to lower your cloud costs

Frequently asked questions

How is serverless priced?

By invocations plus compute in GB-seconds, which is memory times duration. Rates differ by provider, so set them above to match your platform.

Which serverless platform is cheapest?

It depends on your invocation count, duration and memory. Cloudflare Workers is cheap for short requests, while Lambda and Cloud Functions suit heavier compute. Compare on the same numbers.

What is a GB-second?

One gigabyte of memory allocated for one second of execution. It is the standard unit of serverless compute billing across providers.

When is serverless not cost effective?

For steady, high volume workloads that keep functions busy around the clock, always-on containers or VMs are often cheaper per request.

Are these rates current?

The defaults are July 2026 AWS style estimates. Adjust them to your provider and confirm on their pricing page.

Related calculators