Skip to content
SightLab Cost
Menu
EN

Serverless API Cost Calculator

Estimate request and compute cost for Lambda, Functions, Cloud Run, and Workers.

Serverless invoices mix a request charge with a compute charge that is not the same unit on every cloud. Lambda bills GB-seconds, Azure Functions has consumption SKUs, Cloud Run can bill vCPU-seconds and GiB-seconds, Workers bills requests and CPU time on the paid plan.

This calculator asks for monthly requests, average duration, memory, and (where the SKU needs it) CPU. It does not pretend those CPU models are equivalent — the notes flag the difference.

Workload inputs

Presets

Include free tier

Ranked results

AWS
Lambda · US East (N. Virginia)
Monthly
$0.00
/ mo
Annual
$0.00
/ yr

On-demand x86, first 6 billion GB-seconds. Always Free: 1 million requests and 400,000 GB-seconds per month.

Azure
Functions (Consumption) · East US
Monthly
$0.00
/ mo
Annual
$0.00
/ yr

Consumption plan: 1 million executions and 400,000 GB-s free per month per subscription. Flex Consumption is not modeled.

Google Cloud
Cloud Run · Iowa (us-central1)
Monthly
$0.00
/ mo
Annual
$0.00
/ yr

Request-based (not instance-based) billing. Always Free: 2 million requests, 180,000 vCPU-seconds, 360,000 GiB-seconds.

Cloudflare
Workers Paid · Global (Workers)
Monthly
$5.00
/ mo
Annual
$60.00
/ yr

Workers Paid: $5/month includes 10 million requests and 30 million CPU-ms. Extra requests $0.30/million, extra CPU $0.02 per million CPU-ms. Billed on CPU time, not wall-clock. Documented zero egress.

Cost at other request volumes

1M req

$0.00

10M req

$1.80

50M req

$9.80

100M req

$19.80

How this is calculated

  1. Lambda / Azure: GB-s = requests × seconds × (MB / 1024). Cost = max(0, GB-s − free) × USD/GB-s.
  2. Cloud Run (request-based): vCPU-s and GiB-s = requests × seconds × allocated vCPU or memory.
  3. Workers: billed on CPU-ms, not wall-clock, plus a $5 Paid platform fee. Included 10M requests and 30M CPU-ms.
  4. Request cost = max(0, requests − free) / 1,000,000 × USD per million. Egress uses the internet DTO engine.

Assumptions

On-demand x86, first 6 billion GB-seconds. Always Free: 1 million requests and 400,000 GB-seconds per month.

On-demand public list prices. Lambda uses x86 GB-seconds. Azure uses Consumption GB-seconds. Cloud Run uses request-based vCPU + GiB-seconds. Workers Paid bills requests and CPU-ms plus a $5 platform fee.

Sources

https://aws.amazon.com/lambda/pricing/

Prices last checked: 2026-08-22

Estimates use public on-demand list prices and are not invoices. Provisioned concurrency, Flex Consumption, min instances, and reserved capacity are not included.

Estimates are based on publicly available on-demand list prices and are for informational purposes only. Actual bills may differ due to taxes, discounts, free tier usage, data transfer patterns, and other factors.

Read the methodology →

What this estimate includes

On-demand request and compute SKUs for AWS Lambda, Azure Functions consumption, Google Cloud Run / Cloud Functions list prices, and Cloudflare Workers Paid, plus public internet egress from the function when you enter outbound GB. Free-tier request and compute grants are applied when the toggle is on.

What it does not include

  • Provisioned concurrency, min instances, or always-on Cloud Run
  • API Gateway, load balancer, or Workers KV / R2 operations in front of the function
  • Log ingest and trace export (often larger than compute at scale)
  • Cold-start retries and minimum billed duration rounding beyond what the public page states
  • Committed-use discounts and private contracts

How to read the ranking

Short, tiny functions are usually dominated by the per-request line. Long, memory-heavy jobs are dominated by GB-seconds or vCPU-seconds. Workers’ CPU-time model will not match Lambda GB-seconds even when both serve JSON; treat the ranking as a directional compare, then read the breakdown.

Duration should be average billed duration, not wall-clock p50 from a local test. Providers round up (Lambda to the millisecond with a 1 ms minimum on current docs, older generations used 100 ms). If your observability already shows billed duration, paste that.

FAQ

Why is Workers billed on CPU-ms instead of duration? +

Cloudflare Workers Paid bills CPU time, not wall-clock. A function that waits on fetch() does not accrue CPU-ms while idle. Lambda and Azure Functions Consumption bill GB-seconds from allocated memory × wall-clock. Cloud Run (request-based) bills vCPU-seconds and GiB-seconds for the allocated CPU and memory. The calculator never treats those units as equal.

What does the $5 Workers Paid platform fee cover? +

It is a monthly platform charge on the Paid plan, included in the total when you select Cloudflare. The included 10 million requests and 30 million CPU-ms sit on top of that fee. If your volume stays inside the included amounts, the estimate is $5 plus any internet egress you add.

Are Lambda Provisioned Concurrency and Cloud Run min instances included? +

No. Those SKUs keep capacity warm and add a standing hourly cost the on-demand formula does not see. If you run min instances or provisioned concurrency, this estimate is a lower bound. Azure Flex Consumption is also out of scope.

How is GB-second computed for Lambda? +

GB-s = requests × (duration_ms / 1000) × (memory_MB / 1024). Cost = max(0, GB-s − 400,000 free) × the regional GB-second rate, plus max(0, requests − 1,000,000) / 1e6 × $0.20. Tokyo duration is priced higher than N. Virginia; the catalog uses the regional rate.

Does internet egress use the same engine as the egress calculator? +

Yes. Extra GB you enter here is priced with the public internet Data Transfer Out catalog for that provider and peer region, including free grants when the toggle is on. Same-region chatter between functions and a database is not added unless you put it in the egress field.

Report a price error or odd result →