AWS VPC CIDR Calculator
Plan AWS VPC CIDR sizing, subnet allocation across AZs, and AWS-reserved IP addresses.
Inputs
AWS VPC supports /16 (largest) to /28 (smallest)
Max Subnets of This Size
256
Usable IPs per Subnet
251
Subnets per Availability Zone (even split)
85
Total VPC IP Addresses
65,536
Reserved IPs per Subnet (AWS)
5
Total Usable IPs Across All Subnets
64,256
Step by step
Values used
VPC CIDR Prefix = 16 /; Subnet CIDR Prefix = 24 /; Number of Availability Zones = 3
Usable IPs per subnet
usable = 2^(32 − subnet_prefix) − 5
Max subnets in VPC
max_subnets = 2^(32 − vpc_prefix) / 2^(32 − subnet_prefix)
Max Subnets of This Size
= 256
Usable IPs per Subnet
= 251
Subnets per Availability Zone (even split)
= 85
Total VPC IP Addresses
= 65,536
Reserved IPs per Subnet (AWS)
= 5
Total Usable IPs Across All Subnets
= 64,256
How it works
AWS VPCs support CIDR blocks from /16 (65,536 addresses) down to /28 (16 addresses). Within a VPC, each subnet reserves exactly 5 IP addresses that are not available for use: the network address, the VPC router address, the DNS server address, a reserved address for future use, and the broadcast address (which VPCs don't support but AWS still reserves) — so a /24 subnet's 256 addresses yield only 251 usable IPs. Dividing the VPC's total address space by the chosen subnet size gives the maximum number of same-sized subnets it can hold, which is then typically spread evenly across availability zones for high availability.
Formulas
Usable IPs per subnet
usable = 2^(32 − subnet_prefix) − 5
- p
- Subnet CIDR prefix
Max subnets in VPC
max_subnets = 2^(32 − vpc_prefix) / 2^(32 − subnet_prefix)
- v
- VPC prefix
- s
- Subnet prefix
Frequently Asked Questions
Why does AWS reserve 5 IPs per subnet instead of the usual 2?
Standard IPv4 subnetting reserves 2 addresses (network + broadcast). AWS adds 3 more for VPC-specific infrastructure: the VPC router (second address), the Amazon-provided DNS server (second-to-last address), and a reserved address for future use (third-to-last) — even though VPCs don't actually broadcast.
What's the smallest and largest VPC CIDR block AWS allows?
AWS VPCs support CIDR blocks from /16 (65,536 total addresses) as the largest down to /28 (16 total addresses, 11 usable after reservations) as the smallest.
Why spread subnets across availability zones?
Distributing subnets (and the resources within them) across multiple AZs protects against a single data-center-level failure taking down an entire application — AWS best practice is to place otherwise-identical subnets in at least two, often three, AZs for critical workloads.
Can I resize a VPC's CIDR after creation?
AWS allows adding secondary CIDR blocks to an existing VPC, but the primary CIDR block cannot be changed after creation — this calculator is best used during initial planning to avoid needing secondary blocks later.