Azure Subnet Calculator
Get the usable-IP count the Azure portal will actually show — 5 reserved addresses per VNet subnet, subtracted automatically.
IPv4 Subnet Calculator
Results
Network Map
Summary
AZURE Reserved IPs
Azure reserves 5 IP addresses in every VNet subnet: the first four and the last.
Advanced: View Binary Representation
IP addresses are stored as binary numbers (1s and 0s) in computers. This is how your network looks in binary:
Advanced Features
🔍 Compare Two Subnets
Compare two subnets to see if they overlap, contain each other, or are completely separate.
Comparison Results
The subnets are completely separate - they do not share any IP addresses.
🧮 VLSM Calculator (Variable Length Subnet Masking)
Create multiple subnets of different sizes from a single network. VLSM optimizes IP address utilization by allocating exactly the right subnet size for each requirement.
VLSM Benefits:
- • Reduces IP address waste by up to 80%
- • Automatically calculates optimal subnet sizes
- • Perfect for complex network designs
- • Supports up to 100 different subnet requirements
Need to Validate IP Addresses?
Before configuring your subnets, ensure your IP addresses are properly formatted with our comprehensive IP validator. Supports both IPv4 and IPv6 with detailed analysis and error detection.
Validate IP AddressesAlso see: general subnet calculator · AWS subnet calculator · GCP subnet calculator
Why Azure shows fewer usable IPs than a generic calculator
This trips up almost everyone the first time: you size a subnet as
10.1.0.0/24,
a textbook calculator promises 254 hosts, and the Azure portal stubbornly reports
251 available. Neither number is a bug — Azure simply takes three extra
addresses beyond the usual network and broadcast pair. The full list of five:
10.1.0.0Network address — unassignable in any IPv4 network.10.1.0.1Default gateway — Azure's virtual gateway for the subnet. Unlike on-prem, you cannot move it; it is always the first host address.10.1.0.2Azure DNS — mapped into the Azure-provided DNS service (168.63.129.16).10.1.0.3Azure DNS (secondary) — the second address held for the same DNS mapping.10.1.0.255Broadcast address — Azure VNets don't forward broadcast, but the address stays blocked.
The subtraction hurts most at the small end. Azure's minimum subnet is a /29, and of its 8 addresses only 3 are usable. If you're deploying anything that scales — App Service integration, AKS, private endpoints — treat /29 and /28 as too small.
How VNets and subnets relate
A virtual network defines one or more address spaces (CIDR blocks), and subnets partition that space — every subnet must sit entirely inside the VNet's address space, and no two subnets in a VNet may overlap. You can add address space to an existing VNet later, which makes it cheaper to start conservative in Azure than in clouds where growth is harder.
What catches sysadmins off guard is how many Azure services demand their own dedicated,
specifically named subnets: GatewaySubnet
for VPN/ExpressRoute gateways (/27 or larger recommended),
AzureFirewallSubnet (/26),
and AzureBastionSubnet (/26).
Subnets with delegation (App Service, PostgreSQL Flexible Server, and others) also become
exclusive to that service. Budget address space for these before you carve up workload subnets,
because a VNet that's fully tiled leaves nowhere to put the GatewaySubnet you'll inevitably need.
One more planning note: a subnet's CIDR can only be changed while it is empty. Once NICs, private endpoints, or delegations land in it, resizing means evacuating the subnet first — far more disruptive than getting the size right up front with the calculator above.
Azure Subnet FAQ
How many usable IPs are in a /24 Azure subnet?
251. Azure reserves 5 addresses in every subnet: the network address (.0), the default gateway (.1), two addresses mapped to Azure DNS (.2 and .3), and the broadcast address (.255). So a /24 yields 251 assignable IPs, not the 254 a generic subnet calculator shows.
What is the minimum subnet size in Azure?
/29 (8 addresses). After Azure's 5 reservations, a /29 leaves just 3 usable IPs. The largest supported subnet is /2. In practice, anything smaller than /28 is only useful for tiny point solutions — most service subnets need more room.
Why does the Azure portal show fewer available IPs than my subnet calculator?
Generic calculators subtract only the network and broadcast addresses (2 per subnet). Azure additionally takes the gateway address and two Azure DNS addresses, so the portal's 'Available IPs' figure is always 3 lower than a generic calculator predicts. This calculator subtracts all 5, so its numbers match the portal.
How big should the GatewaySubnet be for a VPN or ExpressRoute gateway?
Microsoft recommends /27 or larger for GatewaySubnet. A /27 has 27 usable IPs after reservations, which leaves room for gateway scaling and coexistence of VPN and ExpressRoute gateways. Other service subnets have their own minimums, such as /26 for AzureFirewallSubnet and /26 for AzureBastionSubnet.
More Network Tools
Free tools for network engineers — no signup, no rate-limit walls.