VPC CIDR Calculator
Size an Amazon VPC CIDR block, see its usable range, how many subnets it yields and what the five AWS reservations cost you.
About VPC CIDR Calculator
The VPC block holds 2^(32 − prefix) addresses, and carving it into subnets of a longer prefix gives a power-of-two subnet count. AWS then takes five addresses out of every subnet — the network address, the VPC router, the Amazon DNS resolver, one address held for future use, and the broadcast address — so the assignable total shrinks as you cut the space into more, smaller subnets. A VPC CIDR cannot be shrunk after creation and overlapping ranges block future peering, Transit Gateway attachments and VPN routes, so the first prefix you pick constrains the account for years.
Formula
VPC CIDR
addresses = 2^(32 − prefix); subnets = 2^(subnet prefix − VPC prefix); assignable = addresses − 5 × subnets.
- 5
- Addresses AWS reserves in every subnet
- prefix
- VPC CIDR prefix length, between 16 and 28
- subnet prefix
- Prefix length of each subnet carved from the VPC
Worked example
With the default values below, VPC CIDR Calculator returns Primary CIDR Range of 10.0.0.0/16 (10.0.0.0 – 10.0.255.255). Change any input above and every figure here is recalculated in your browser.
Inputs used
- VPC network address
- 10.0.0.0
- VPC CIDR prefix lengthaccepts 16–28 bits
- 16 bits
- Planned subnet prefix lengthaccepts 16–28 bits
- 24 bits
- Additional CIDR blocks associatedaccepts 0–4 blocks
- 1 blocks
Results
- Primary CIDR Range
- 10.0.0.0/16 (10.0.0.0 – 10.0.255.255)
- Addresses in Primary Block
- 65,536
- Subnets of the Planned Size
- 256
- Assignable After AWS Reservations
- 64,256
- Addresses Reserved by AWS
- 1,280
- CIDR Blocks Used
- 2 of 5 allowed per VPC by default
Step by step
- 1Values used
- 2VPC CIDR
- 3Primary CIDR Range= 10.0.0.0/16 (10.0.0.0 – 10.0.255.255)
- 4Addresses in Primary Block= 65,536
- 5Subnets of the Planned Size= 256
- 6Assignable After AWS Reservations= 64,256
- 7Addresses Reserved by AWS= 1,280
- 8CIDR Blocks Used= 2 of 5 allowed per VPC by default
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, 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
How is VPC CIDR calculated?
addresses = 2^(32 − prefix); subnets = 2^(subnet prefix − VPC prefix); assignable = addresses − 5 × subnets. The VPC block holds 2^(32 − prefix) addresses, and carving it into subnets of a longer prefix gives a power-of-two subnet count. AWS then takes five addresses out of every subnet — the network address, the VPC router, the Amazon DNS resolver, one address held for future use, and the broadcast address — so the assignable total shrinks as you cut the space into more, smaller subnets.
Why does VPC CIDR matter?
A VPC CIDR cannot be shrunk after creation and overlapping ranges block future peering, Transit Gateway attachments and VPN routes, so the first prefix you pick constrains the account for years.
What values do I need to enter?
This calculator takes 4 inputs: VPC network address, VPC CIDR prefix length, Planned subnet prefix length, Additional CIDR blocks associated. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Can I change a VPC CIDR block later?
You cannot resize or remove the primary CIDR block. You can associate up to four additional blocks (five in total by default), but they must not overlap anything you peer with, so plan the primary block with room to grow.
Why does a smaller subnet waste proportionally more space?
The five AWS reservations are per subnet, not per VPC. In a /28 (16 addresses) they consume 31% of the block; in a /24 they consume 2%. Splitting a VPC into many tiny subnets can lose thousands of addresses to reservations alone.
