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.
Inputs
For example public, private application and database tiers.
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
Values used
VPC CIDR prefix length = 16 bits; Subnet prefix length = 24 bits; Availability Zones in use = 3 zones; Subnet tiers per zone = 3 tiers
AWS Subnet
usable IPs = 2^(32 − subnet prefix) − 5; subnets required = zones × tiers; subnets available = 2^(subnet prefix − VPC prefix).
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
How it works
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
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.