Practical guide
Amazon EC2 pricing explained: instance costs and extras
Learn how Amazon EC2 pricing works: instance-hours, On-Demand and commitment options, plus EBS, transfer, IPv4, and other charges.
By StackCalcs · Updated · Sources checked
Amazon EC2 pricing in brief
Amazon EC2 pricing starts with the compute rate for the instance type, AWS Region, operating system, and purchase option. For a simple On-Demand estimate, multiply each instance’s rate by its billed running time, then add the storage and network costs that apply to the workload. The EC2 cost calculator estimates Linux T3 compute in US East; it does not estimate a complete AWS bill.
Estimate the monthly compute charge
Use this formula for each instance type and purchase option:
compute estimate = instance count × billed hours per instance × hourly rate
For example, two instances that each run for 730 hours use 1,460 instance-hours. Multiply 1,460 by the current hourly rate for the selected Region, operating system, and purchase option. A 730-hour month is a comparison assumption, not the number of hours in every calendar month.
On-Demand Linux, Windows, RHEL, and Ubuntu Pro instances generally bill per second with a 60-second minimum; SUSE Linux Enterprise Server instances bill by the full hour. Stopping an instance stops its compute usage charges, but retained EBS volumes continue to incur storage charges. Check the pricing terms for the exact operating system and purchase option before treating hourly usage as a monthly total.
Add the charges outside the instance rate
| Cost item | What to include |
|---|---|
| EBS | Volume storage, provisioned IOPS or throughput where applicable, and retained snapshots. These charges are separate from instance compute. |
| Data transfer | Internet egress and cross-Region traffic that applies to the architecture. AWS transfer tiers can aggregate eligible usage across services. |
| Public IPv4 | Address-hours for public IPv4 addresses attached to the workload. |
| Other services | Load balancers, NAT gateways, monitoring, backups, and managed services used with the instance. Estimate each service using its own units and rates. |
Region, operating system, and purchase option can change the compute rate. Spot Instances can be interrupted; Reserved Instances and Savings Plans involve commitment terms and do not remove charges for attached services. Review the current EC2 On-Demand pricing and EC2 stop and start cost guidance for the exact billing rules.
Check an estimate against your bill
Model instance count and running time first. Add EBS capacity and performance, data transfer, public IPv4 time, and any dependent services. Then compare the estimate with AWS Cost Explorer or your Cost and Usage Report, which reflects the resources and rates actually billed. Taxes, credits, negotiated discounts, and commitments can make the final amount differ from an On-Demand estimate.
Official sources
- https://aws.amazon.com/ec2/pricing/on-demand/
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-reserved-instances.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-ec2-instance-stop-start-works.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html