Skip to content
Calcrivo

Azure Virtual Network Planner

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

Inputs

Written as network/prefix, for example 10.20.0.0/16.

bits
bits

Azure supports /2 down to /29 for a subnet.

subnets
addresses

Usable Addresses per Subnet

251addresses

Subnets Available

256subnets

Spare Subnets

244subnets

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. Values used

    VNet address space = 10.20.0.0/16; VNet prefix length = 16 bits; Subnet prefix length = 24 bits; Subnets required = 12 subnets; Usable addresses needed per subnet = 200 addresses

  2. 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.

  3. Usable Addresses per Subnet

    = 251 addresses

  4. Subnets Available

    = 256 subnets

  5. Spare Subnets

    = 244 subnets

  6. Smallest Prefix That Fits

    = /24

  7. VNet Network Address

    = 10.20.0.0/16

  8. Design Verdict

    = Design fits with 244 spare subnets

How it works

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

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.

You might also need