Skip to content
ENExplore Calculators

AWS Subnet Calculator

Work out usable IPs per AWS subnet after the five reserved addresses, and check a multi-AZ, multi-tier layout fits the VPC.

About AWS Subnet Calculator

Every AWS subnet loses five addresses to the network address, the VPC router, the Amazon-provided DNS server, a reserved future-use address and the broadcast address, so a /24 gives 251 usable IPs rather than 254. Because a subnet lives in exactly one Availability Zone, the subnet count is zones multiplied by tiers, and that product has to fit inside the subnet slots the VPC prefix provides. Subnets cannot be resized after creation, and an ENI-hungry workload such as EKS with the VPC CNI can exhaust a /24 far sooner than the raw address count suggests.

Formula

AWS Subnet

usable IPs = 2^(32 − subnet prefix) − 5; subnets required = zones × tiers; subnets available = 2^(subnet prefix − VPC prefix).

subnet prefix
Prefix length of each subnet
zones
Availability Zones the design spans
tiers
Routing tiers replicated in every zone

Worked example

With the default values below, AWS Subnet Calculator returns Usable IPs per Subnet of 251. Change any input above and every figure here is recalculated in your browser.

Inputs used

VPC CIDR prefix lengthaccepts 16–28 bits
16 bits
Subnet prefix lengthaccepts 16–28 bits
24 bits
Availability Zones in useaccepts 1–6 zones
3 zones
Subnet tiers per zoneaccepts 1–8 tiers
3 tiers

Results

Usable IPs per Subnet
251
Subnets Required
9
Subnets the VPC Can Hold
256
Total Usable IPs Across the Design
2,259
Address Efficiency
98.0%
Capacity Check
Fits with 247 subnets spare

Step by step

  1. 1Values used
  2. 2AWS Subnet
  3. 3Usable IPs per Subnet= 251
  4. 4Subnets Required= 9
  5. 5Subnets the VPC Can Hold= 256
  6. 6Total Usable IPs Across the Design= 2,259
  7. 7Address Efficiency= 98.0
  8. 8Capacity Check= Fits with 247 subnets spare

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 1 decimal place, 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 AWS Subnet calculated?

usable IPs = 2^(32 − subnet prefix) − 5; subnets required = zones × tiers; subnets available = 2^(subnet prefix − VPC prefix). Every AWS subnet loses five addresses to the network address, the VPC router, the Amazon-provided DNS server, a reserved future-use address and the broadcast address, so a /24 gives 251 usable IPs rather than 254. Because a subnet lives in exactly one Availability Zone, the subnet count is zones multiplied by tiers, and that product has to fit inside the subnet slots the VPC prefix provides.

Why does AWS Subnet matter?

Subnets cannot be resized after creation, and an ENI-hungry workload such as EKS with the VPC CNI can exhaust a /24 far sooner than the raw address count suggests.

What values do I need to enter?

This calculator takes 4 inputs: VPC CIDR prefix length, Subnet prefix length, Availability Zones in use, Subnet tiers per zone. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why does AWS reserve five addresses instead of two?

On top of the usual network and broadcast addresses, AWS reserves the second address for the VPC router, the third for the Amazon DNS resolver, and the fourth for future use. That is why the smallest allowed subnet, a /28, offers 11 usable addresses out of 16.

How many subnets should I create per Availability Zone?

Create one subnet per zone per distinct routing behaviour. A public tier with a route to the internet gateway, a private tier routed through NAT, and an isolated data tier is the common three-tier pattern — extra subnets that share a route table add management overhead without adding isolation.

AWS Subnet Calculator – Calculate Usable IPs per Subnet