Skip to content

AWS Lambda vs Fargate cost calculator: the serverless vs containers break-even point

Price one workload on Lambda, Fargate, Cloud Run and a VM cluster, then see the request rate at which the cheapest option changes.

Runs in your browser. Your inputs are not uploaded.Open formulaPrices updated November 2026
How to verify this

Open your browser's network tab and change an input: nothing is sent. The page computes with the formulas and the dated price table below. Some entries in that table could not be checked against an official page and are labelled. The same engine answers the API and the MCP tool, so you can reproduce any scenario from code.

Jump to results

Your inputs

Traffic
Monthly average.
Traffic spikiness. It sizes container capacity only in static_peak mode.
Function and container size
Function and container memory.
One of 0.25, 0.5, 1, 2 or 4.
Sets the Lambda and Fargate rates. Cloud Run has one rate; pick an Arm instance below for the VM cluster.
Containers
Concurrency: requests one container serves at the same time.
Headroom on container capacity.
High-availability floor.
Compare
Platforms to compare
A break-even needs at least one serverless (Lambda, Cloud Run) and one container (Fargate, VM cluster) platform.
Used by the VM cluster. The default is 4 vCPU / 16 GiB.
About you
Used for analytics and the next-step suggestion only; it never changes the prices.
Used for analytics and the next-step suggestion only; it never changes the prices.

At 1.3M requests/day, Fargate becomes cheaper than Cloud Run.

  • Note:Fargate has no 0.5 vCPU / 0.5 GB task size; it was rounded up to 0.5 vCPU / 1 GB.
  • Heads-up:Containers run at 12% of capacity because of the 2-container floor.
  • Note:Some prices for VM cluster, m7i.xlarge (hourly_usd) could not be confirmed on an official vendor page and are assumptions or third-party values. Treat that part of the comparison as an estimate and check your own bill.
  • Note:API gateway and load balancer charges are not included.
Requests per month
51,840,000
2.4 in flight on average
Cheapest option
AWS Fargate
$35.55 per month
Break-even
15.59 req/s
1,346,834 requests/day
Your traffic
20 req/s
1,728,000 requests/day

Monthly cost vs requests per second

$0.1$1$10$100$1k$10k$100k0.11101001k10kRequests per second (log scale)Cost per month, USD (log scale)Break-even 15.59 req/sAWS Fargate at your 20 requests/s: $35.55 per monthGoogle Cloud Run at your 20 requests/s: $41.94 per monthAWS Lambda at your 20 requests/s: $62.21 per monthVM cluster at your 20 requests/s: $290.3 per month
  • AWS Lambda
  • AWS Fargate
  • Google Cloud Run
  • VM cluster
  • Your traffic
  • Break-even
Cost per platform, cheapest first
PlatformMonthly costUnitsPer million requestsContainer utilizationWhat is priced
AWS Fargate$35.552 tasks$0.68612%2 × 0.5 vCPU / 1 GB tasks; vCPU-hours $29.15; Memory GB-hours $6.40
Google Cloud Run$41.942 instances$0.80912%0.5 vCPU / 0.5 GiB instances, 2 kept warm; Active vCPU-seconds $7.46; Active GiB-seconds $0.78; Requests $20.74; Minimum instances (idle rates) $12.96
AWS Lambda$62.21n/a (per request)$1.2n/a512 MB on x86; Requests $10.37; Duration (GB-seconds) $51.84
VM cluster *$290.302 instances$5.612%2 × m7i.xlarge, 6 containers each (2 needed); 2 × m7i.xlarge for 720 hours $290.30

* includes a price that could not be checked against an official page.

Monthly cost as one input changes

Calculating the range…

How it is calculated

Load and units

M = 2,592,000 s (a 30-day month)    R = rps × M requests
T = duration ÷ 1000 s    m = memory_mb ÷ 1024 GB
L = rps × T requests in flight (× peak_to_avg_ratio in static_peak mode)

Lambda

C_L = R ÷ 10^6 × r_req + R × T × m × r_gbs

Containers needed

n = max(min_containers, ceil(L ÷ (cc × u)))
cc = concurrency per container, u = target utilization as a fraction
utilization = (rps × T) ÷ (n × cc)

Fargate

C_F = n × 720 × (v′ × r_vcpu_hour + m′ × r_gb_hour)
(v′, m′) = the cheapest valid Fargate vCPU and memory pair at or above (vCPU, m)

Cloud Run

C_R = (R × T ÷ cc) × (v × r_cpu_s + m × r_mem_s)
    + R ÷ 10^6 × r_req
    + min_containers × M × (v × r_idle_cpu_s + m × r_idle_mem_s)

VM cluster

per instance = floor(0.85 × min(instance vCPU ÷ v, instance GiB ÷ m))
instances = max(2, ceil(n ÷ per instance))
C_V = instances × 720 × hourly rate

Break-even

Evaluate every platform at 120 log-spaced request rates from 0.1 to 10,000 per second (widened to include your rate).
Break-even = the lowest rate above which the cheapest container platform (Fargate, VM cluster) stays cheaper than the cheapest serverless one (Lambda, Cloud Run) to the end of the range.
If containers scale in steps and the lead changes more than once, the first crossing is shown as well.

Assumptions

  • A month is 30 days (2,592,000 seconds, 720 hours) for every platform. Traffic is the monthly average; spikes only change container counts in static_peak mode.
  • Containers are sized from requests in flight (Little's law) at the target utilization, with a minimum container count for availability. Utilization shown is average load divided by capacity.
  • Lambda is priced at list request and GB-second rates in US East (N. Virginia). Higher-volume duration tiers, provisioned concurrency and the extra cost of memory-driven CPU are not modelled.
  • Fargate is priced on Linux tasks in US East (N. Virginia). The vCPU and memory pair is rounded up to the cheapest valid combination in the dataset.
  • Cloud Run is priced with request-based billing at Tier 1 (us-central1) rates: busy instance-seconds are requests × duration ÷ concurrency, and the minimum instances are billed at idle rates for the whole month on top. The free allowance, when on, is taken off the busy usage and the request count.
  • The VM cluster stands in for Kubernetes nodes you run yourself: always-on instances at on-demand rates, 85% of each instance usable by containers, at least 2 instances. Control-plane fees, storage and networking are not included.
  • Prices are list prices in USD with no savings plans, Spot, committed-use or negotiated discounts. API gateway, load balancer, data transfer, NAT and logging charges are excluded.
  • The Arm option changes the Lambda and Fargate rates. Cloud Run has one rate, and the VM follows the instance you choose.

The data behind it

List prices used, in USD. Lambda and Fargate: US East (N. Virginia). Cloud Run: Tier 1 (us-central1).
PlatformItemPriceChecked
AWS LambdaRequests, per million$0.202026-11-05
AWS LambdaDuration, x86, per GB-second$0.00001666672026-11-05
AWS LambdaDuration, Arm, per GB-second$0.00001333342026-11-05
AWS LambdaFree tier, per month1,000,000 requests, 400,000 GB-seconds2026-11-05
AWS LambdaMaximum memory10,240 MB2026-11-05
AWS FargatevCPU, x86, per hour$0.040482026-11-05
AWS FargateMemory, x86, per GB-hour$0.0044452026-11-05
AWS FargatevCPU, Arm, per hour$0.032382026-11-05
AWS FargateMemory, Arm, per GB-hour$0.003562026-11-05
AWS FargateMinimum billed time per Linux task60 seconds2026-11-05
Google Cloud RunBusy vCPU, per second$0.0000242026-11-05
Google Cloud RunBusy memory, per GiB-second$0.00000252026-11-05
Google Cloud RunRequests, per million$0.402026-11-05
Google Cloud RunMinimum instance idle vCPU, per second$0.00000252026-11-05
Google Cloud RunMinimum instance idle memory, per GiB-second$0.00000252026-11-05
Google Cloud RunFree tier, per month180,000 vCPU-seconds, 360,000 GiB-seconds, 2,000,000 requests2026-11-05
Valid Fargate vCPU and memory pairs (Linux tasks)
vCPUMemory (GB)
0.250.5, 1, 2
0.51, 2, 3, 4
12, 3, 4, 5, 6, 7, 8
24, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
48, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
816, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60
1632, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120
3260, 120, 244
Reference VM instances, on-demand, US East (N. Virginia). * = hourly price is a third-party value, not checked against an official page
InstancevCPUMemory (GiB)ArchitecturePer hourChecked
m7i.large *28x86$0.1008Not verified
m7i.xlarge *416x86$0.2016Not verified
m7i.2xlarge *832x86$0.4032Not verified
m7g.large *28Arm$0.0816Not verified
m7g.xlarge *416Arm$0.1632Not verified
m7g.2xlarge *832Arm$0.3264Not verified
Model constants
ConstantValue
Seconds per month (30 days)2,592,000
Hours per month720
Share of a VM that containers can use85%
Minimum VM instances2
Break-even search range0.1 to 10,000 requests per second, 120 points
Hidden gotchas
TopicWhat catches people out
Lambda duration and concurrencyLambda bills duration in 1 ms steps, but provisioned concurrency is billed on top of that and is not modelled. The free tier does not apply to functions that use it.
Fargate sizes and minimum timeFargate only offers set vCPU and memory pairs (0.5 vCPU takes 1 to 4 GB, for example), so a request is rounded up. Linux tasks are billed per second with a one-minute minimum per task.
Cloud Run billing modeCloud Run can bill per request (CPU only while a request is being handled) or per instance (for the whole life of the instance). This calculator prices request-based billing. The pricing page also rounds billable time up to the nearest 100 ms, which the calculator does not, so very short requests are understated.
Always-on floorsA high-availability floor keeps containers running when traffic is low. The calculator warns when containers run under 20% of capacity because of it.
Gateway and load balancerAPI gateway and load balancer charges are excluded and can exceed compute at high request rates.
Regions and discountsAWS rates here are US East (N. Virginia) and Cloud Run rates are us-central1. Other regions cost more or less, and savings plans, Spot and committed-use discounts can change the order.
VM pricesThe VM hourly prices come from a third-party index because the AWS price table is not available as text, so they are flagged unverified until checked against AWS.

Three ways to reduce this number

  1. Use arm64 where the dataset shows a lower rate: switch the architecture above and compare the Lambda and Fargate rows.
  2. Right-size memory. More memory often shortens duration enough to lower the Lambda bill, so sweep memory and test your function at a few sizes.
  3. Raise container concurrency so fewer, fuller containers carry the load, and keep the minimum container count no higher than your availability needs.

Use it from code

The same engine is available as a REST endpoint and as an MCP tool named calc_serverless_vs_containers_breakeven. Your scenario as an API call:

curl -X POST 'https://api.x12i.com/v1/calc/serverless-vs-containers-breakeven' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "requests_per_second": 20,
    "peak_to_avg_ratio": 3,
    "avg_duration_ms": 120,
    "memory_mb": 512,
    "vcpu_per_task": 0.5,
    "arch": "x86",
    "concurrency_per_container": 10,
    "target_utilization_pct": 60,
    "min_containers": 2,
    "scaling_mode": "follows_load",
    "platforms": [
      "lambda",
      "fargate",
      "cloud_run",
      "vm_cluster"
    ],
    "include_free_tier": false,
    "vm_instance": "m7i.xlarge",
    "current_platform": "none",
    "migration_stage": "evaluating"
  },
  "options": {
    "explain": false
  }
}'

Schema: GET /v1/calc/serverless-vs-containers-breakeven/schema

Frequently asked questions

At what traffic is Fargate cheaper than Lambda?

There is no single number. Lambda's bill grows in a straight line with traffic, while a container fleet is a flat floor (your minimum containers) that rises in whole steps, so the two lines cross where Lambda's monthly cost equals the container cost. Short, light requests push that crossing to higher traffic; long or memory-heavy requests pull it down. This calculator finds the crossing for your numbers and shows it in the headline and the chart.

Does Lambda get cheaper with more memory?

Lambda charges for memory multiplied by duration, so a bigger setting costs more per millisecond. It gets cheaper only when the extra memory, and the extra CPU that comes with it, shortens the run by more than it raises the rate. For example, doubling memory pays off if the duration falls by more than half. Measure your function at a few sizes and use the memory sweep here to see the effect on the bill.

What costs does this comparison leave out?

API gateway and load balancer charges, data transfer, NAT gateways, logs and monitoring, storage beyond the included amounts, Lambda provisioned concurrency, Kubernetes control-plane fees, taxes, and any savings plan, Spot or committed-use discount. It also leaves out the engineering time to run containers or to fit a workload into functions. Prices are list prices for one region per vendor.

Why does the break-even sometimes cross more than once?

Containers are added in whole steps, while Lambda's cost rises smoothly. When the two have similar cost per request, the stepped line can dip below and rise above the smooth one several times. The calculator then reports the first crossing and the rate above which containers stay cheaper, and flags the result as not stable.