Fargate vs EC2 cost calculator
Enter how many containers you run and what each one needs. Compare the monthly cost of AWS Fargate with the same containers on EC2 instances. Nothing you type leaves your browser.
Runs in your browser, nothing is uploadedDefaults use us-east-1 Linux prices: Fargate x86 $0.04048 per vCPU-hour and $0.004445 per GB-hour, ARM $0.03238 and $0.00356. The EC2 default is an m5.large at $0.096 an hour. Enter your own instance price for a different type.
How to use the Fargate vs EC2 cost calculator
- Enter the number of containers that run all month and the vCPU and memory each task is set to in its task definition.
- Pick x86 or ARM for Fargate, then enter the instance you would use on EC2 with its hourly price, vCPUs and memory.
- Set how full you can pack the instances. 60 to 80 percent is realistic once you leave room for system processes and growth.
Example: 10 small tasks
Ten tasks of 0.5 vCPU and 1 GB cost about $180 a month on x86 Fargate. The same tasks need four m5.large instances when packed 70 percent full, which is about $280 a month, so Fargate is cheaper here.
Fargate wins when your containers are small and few, because you pay only for what each task asks for. EC2 starts to win when you can fill instances well, or run enough steady tasks to use Savings Plans or Spot.
Common questions
Is Fargate more expensive than EC2?
Per unit of compute, usually yes, by roughly 20 to 40 percent when EC2 is well packed. For small or uneven workloads Fargate often costs less in total because you do not pay for empty server capacity.
Can Spot or Savings Plans change the answer?
Yes. Fargate Spot gives up to 70 percent off and Compute Savings Plans cover both Fargate and EC2, so check the discounted price for both before choosing.
What about EKS?
EKS adds a control plane fee of about $73 a month per cluster on top of either Fargate or EC2 node costs. This calculator covers the compute only.
Read next: EC2 vs ECS vs EKS
More free tools
- AWS savings estimator
- gp2 to gp3 savings calculator
- GitHub Actions cost calculator
- Savings Plans vs On-Demand calculator
- Graviton savings calculator
- EBS snapshot cost calculator
- Terraform state lock troubleshooter
- AWS policy checker
- VPC CIDR and subnet calculator
- NAT gateway cost calculator
- S3 lifecycle policy generator
- EKS version support checker
- YAML validator and formatter
- Cron expression explainer
- Cron expression generator
- Base64 and JWT decoder
Want the real numbers for your AWS account?
Send me your setup and I will return a written list of savings and security fixes, safest first. It is free.
Prefer to pay through Fiverr, with order protection? Order a paid AWS bill review.