Skip to content
ENExplore Calculators

Azure Virtual Network Planner

Plan an Azure VNet address space with the five reserved addresses per subnet and check the design actually fits.

About Azure Virtual Network Planner

Azure takes five addresses out of every subnet rather than the two an on-premises network loses, so a /29 yields three usable addresses and a /24 yields 251. Subnet capacity within the VNet is a simple power of two on the difference between the prefix lengths, and both constraints have to pass for the design to be viable. Subnets cannot be resized while resources are deployed in them, and services such as Application Gateway, Azure Firewall, Bastion and the VPN Gateway each demand their own dedicated subnet with a minimum size, so an address plan that is short by one bit becomes a redeployment.

Formula

Azure Virtual Network

usable addresses = 2^(32 − subnet prefix) − 5, because Azure reserves the network address, the default gateway, two DNS-mapping addresses and the broadcast address in every subnet.

5
Addresses Azure reserves in every subnet regardless of size
subnets available
2 raised to the difference between the subnet and VNet prefix lengths
smallest prefix
Shortest subnet that still leaves room for your host count plus the reservations

Worked example

With the default values below, Azure Virtual Network Planner returns Usable Addresses per Subnet of 251. Change any input above and every figure here is recalculated in your browser.

Inputs used

VNet address space
10.20.0.0/16
VNet prefix lengthaccepts 2–29 bits
16 bits
Subnet prefix lengthaccepts 2–29 bits
24 bits
Subnets requiredaccepts 1–65,536 subnets
12 subnets
Usable addresses needed per subnetaccepts 1–4,000,000 addresses
200 addresses

Results

Usable Addresses per Subnet
251 addresses
Subnets Available
256 subnets
Spare Subnets
244 subnets
Smallest Prefix That Fits
/24
VNet Network Address
10.20.0.0/16
Design Verdict
Design fits with 244 spare subnets

Step by step

  1. 1Values used
  2. 2Azure Virtual Network
  3. 3Usable Addresses per Subnet= 251 addresses
  4. 4Subnets Available= 256 subnets
  5. 5Spare Subnets= 244 subnets
  6. 6Smallest Prefix That Fits= /24
  7. 7VNet Network Address= 10.20.0.0/16
  8. 8Design Verdict= Design fits with 244 spare subnets

Assumptions and limits

  • The result is derived only from the 5 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 Azure Virtual Network calculated?

usable addresses = 2^(32 − subnet prefix) − 5, because Azure reserves the network address, the default gateway, two DNS-mapping addresses and the broadcast address in every subnet. Azure takes five addresses out of every subnet rather than the two an on-premises network loses, so a /29 yields three usable addresses and a /24 yields 251. Subnet capacity within the VNet is a simple power of two on the difference between the prefix lengths, and both constraints have to pass for the design to be viable.

Why does Azure Virtual Network matter?

Subnets cannot be resized while resources are deployed in them, and services such as Application Gateway, Azure Firewall, Bastion and the VPN Gateway each demand their own dedicated subnet with a minimum size, so an address plan that is short by one bit becomes a redeployment.

What values do I need to enter?

This calculator takes 5 inputs: VNet address space, VNet prefix length, Subnet prefix length, Subnets required, Usable addresses needed per subnet. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Azure Virtual Network Planner | Calcrivo