Skip to content
ENExplore Calculators

AWS VPC CIDR

Plan AWS VPC and subnet CIDR blocks accounting for AWS-reserved addresses.

About AWS VPC CIDR

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

Worked example

With the default values below, AWS VPC CIDR returns Max Subnets of This Size of 256. Change any input above and every figure here is recalculated in your browser.

Inputs used

VPC CIDR Prefixaccepts 16–28 /
16 /
Subnet CIDR Prefixaccepts 16–28 /
24 /
Number of Availability Zonesaccepts 1–6
3

Results

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

  1. 1Values used
  2. 2Usable IPs per subnet
  3. 3Max subnets in VPC
  4. 4Max Subnets of This Size= 256
  5. 5Usable IPs per Subnet= 251
  6. 6Subnets per Availability Zone (even split)= 85
  7. 7Total VPC IP Addresses= 65,536
  8. 8Reserved IPs per Subnet (AWS)= 5
  9. 9Total Usable IPs Across All Subnets= 64,256

Assumptions and limits

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

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.

AWS VPC CIDR – Calculate Max Subnets of This Size | Calcrivo