Skip to content
ENExplore Calculators

EC2 Elastic IP Calculator

Cost public IPv4 addresses now that every one bills hourly, isolate idle waste, and compare against a NAT gateway.

About EC2 Elastic IP Calculator

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

Worked example

With the default values below, EC2 Elastic IP Calculator returns Monthly Public IPv4 Cost of $43.80. Change any input above and every figure here is recalculated in your browser.

Inputs used

Public IPv4 addresses in useaccepts 0–10,000 addresses
12 addresses
Addresses not attached to a running resourceaccepts 0–10,000 addresses
3 addresses
Price per address-hourminimum 0 USD/hour
0.005 USD/hour
Hours in the billing monthaccepts 0–744 hours
730 hours
NAT gateway hourly priceminimum 0 USD/hour
0.045 USD/hour
Data processed through a NAT gatewayaccepts 0–10,000,000 GB
2,000 GB
NAT gateway data processing priceminimum 0 USD/GB
0.045 USD/GB

Results

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

  1. 1Values used
  2. 2EC2 Elastic IP
  3. 3Monthly Public IPv4 Cost= 43.80
  4. 4Cost per Address per Month= 3.65
  5. 5Wasted on Idle Addresses= 10.95
  6. 6Annual Public IPv4 Cost= 525.60
  7. 7One NAT Gateway Instead= 122.85
  8. 8Cheaper Pattern= Keeping 12 public addresses costs less than a NAT gateway at this data volume

Assumptions and limits

  • The result is derived only from the 7 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

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.

EC2 Elastic IP Calculator | Calcrivo