EC2 Elastic IP Calculator
Cost public IPv4 addresses now that every one bills hourly, isolate idle waste, and compare against a NAT gateway.
Inputs
AWS charges for all public IPv4 addresses, attached or not. Editable — confirm the current rate for your region.
Monthly Public IPv4 Cost
$43.80
Cost per Address per Month
$3.65
Wasted on Idle Addresses
$10.95
Annual Public IPv4 Cost
$525.60
One NAT Gateway Instead
$122.85
Cheaper Pattern
Keeping 12 public addresses costs less than a NAT gateway at this data volume
Step by step
Values used
Public IPv4 addresses in use = 12 addresses; Addresses not attached to a running resource = 3 addresses; Price per address-hour = 0.0050 USD/hour; Hours in the billing month = 730 hours; NAT gateway hourly price = 0.0450 USD/hour; Data processed through a NAT gateway = 2,000 GB; NAT gateway data processing price = 0.0450 USD/GB
EC2 Elastic IP
monthly cost = price per address-hour × hours × addresses; NAT alternative = hourly price × hours + GB processed × per-GB price.
Monthly Public IPv4 Cost
= 43.80
Cost per Address per Month
= 3.65
Wasted on Idle Addresses
= 10.95
Annual Public IPv4 Cost
= 525.60
One NAT Gateway Instead
= 122.85
Cheaper Pattern
= Keeping 12 public addresses costs less than a NAT gateway at this data volume
How it works
Since February 2024 AWS bills every public IPv4 address by the hour whether it is attached or not, which turned a free-if-attached resource into a per-address line item. That flips the economics of giving each instance its own public address: past a couple of dozen addresses, moving instances into private subnets behind a single NAT gateway is usually cheaper — until the NAT's per-GB processing charge overtakes the address savings. Idle Elastic IPs used to cost a token amount and now cost the same as attached ones, so unreleased addresses left behind by deleted stacks are pure waste that no dashboard highlights.
Formula
EC2 Elastic IP
monthly cost = price per address-hour × hours × addresses; NAT alternative = hourly price × hours + GB processed × per-GB price.
- address-hour
- One public IPv4 address held for one hour
- idle
- Allocated addresses with nothing running behind them
- NAT gateway
- Shared egress path that needs only one public address
Frequently Asked Questions
How is EC2 Elastic IP calculated?
monthly cost = price per address-hour × hours × addresses; NAT alternative = hourly price × hours + GB processed × per-GB price. Since February 2024 AWS bills every public IPv4 address by the hour whether it is attached or not, which turned a free-if-attached resource into a per-address line item. That flips the economics of giving each instance its own public address: past a couple of dozen addresses, moving instances into private subnets behind a single NAT gateway is usually cheaper — until the NAT's per-GB processing charge overtakes the address savings.
Why does EC2 Elastic IP matter?
Idle Elastic IPs used to cost a token amount and now cost the same as attached ones, so unreleased addresses left behind by deleted stacks are pure waste that no dashboard highlights.
What values do I need to enter?
This calculator takes 7 inputs: Public IPv4 addresses in use, Addresses not attached to a running resource, Price per address-hour, Hours in the billing month, NAT gateway hourly price, Data processed through a NAT gateway, NAT gateway data processing price. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Does IPv6 avoid this charge?
Yes — AWS does not charge for IPv6 addresses. Dual-stack or IPv6-only subnets with an egress-only internet gateway sidestep both the per-address charge and NAT gateway costs, at the price of needing IPv6 support end to end.
You might also need
- EC2 Instance Cost CalculatorCommonly used together
- EC2 Monthly Cost CalculatorCommonly used together
- EC2 Fleet Capacity CalculatorCommonly used together
- EC2 Instance Right-Sizing CalculatorAlso in AWS Compute
- Reserved Instance Savings CalculatorAlso in AWS Compute
- EC2 AMI Storage CalculatorAlso in AWS Compute