← All free tools

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 uploaded

Defaults 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.

The cheaper option

-

What the numbers leave out

    How to use the Fargate vs EC2 cost calculator

    1. Enter the number of containers that run all month and the vCPU and memory each task is set to in its task definition.
    2. Pick x86 or ARM for Fargate, then enter the instance you would use on EC2 with its hourly price, vCPUs and memory.
    3. 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

    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.