Subnetcalculator

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

Private (RFC 1918)

Paste CIDR notation (e.g. 10.0.0.0/22) to set the mask automatically

Azure mode: usable-host counts subtract the 5 addresses Azure reserves in every subnet (minimum subnet size /29).

Results update instantly as you type

Results

Network Map

10.1.0.0
10.1.0.255
Network Address
The starting address of your subnet
Broadcast Address
The final address of your subnet
Usable IP Addresses
251 addresses you can assign to devices
AZURE Reserved
IPs reserved by AZURE in your subnet

Summary

Your Network
10.1.0.0/24
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
First Usable IP
10.1.0.4
Last Usable IP
10.1.0.254
Total Usable IPs
251
Next Network
10.1.1.0

AZURE Reserved IPs

Azure reserves 5 IP addresses in every VNet subnet: the first four and the last.

Network: 10.1.0.0
Default Gateway: 10.1.0.1
Azure DNS: 10.1.0.2
Azure DNS (secondary): 10.1.0.3
Broadcast: 10.1.0.255
Advanced: View Binary Representation

IP addresses are stored as binary numbers (1s and 0s) in computers. This is how your network looks in binary:

IP Address
00001010.00000001.00000000.00000000
Subnet Mask
11111111.11111111.11111111.00000000
Network
00001010.00000001.00000000.00000000
Broadcast
00001010.00000001.00000000.11111111

Advanced Features

🔍 Compare Two Subnets

Compare two subnets to see if they overlap, contain each other, or are completely separate.

Comparison Results

Subnet 1
192.168.1.0/24
Range: 192.168.1.0 - 192.168.1.255
Subnet 2
192.168.2.0/24
Range: 192.168.2.0 - 192.168.2.255
Separate Subnets

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 Addresses

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