Subnet Calculator
Calculate subnet mask, network address, broadcast address and host count from an IP address and prefix length.
About Subnet Calculation
Subnetting divides a large IP network into smaller sub-networks (subnets). Each subnet has a network address (the first IP), a broadcast address (the last IP), and a range of usable host addresses in between. The subnet mask determines the size of the subnet by specifying which bits of the IP address are the network portion and which are the host portion.
Key subnet fields explained
- Network address — The first address in the subnet. All host bits are zero. Identifies the subnet itself; cannot be assigned to a host.
- Broadcast address — The last address in the subnet. All host bits are one. A packet sent to this address is delivered to all hosts in the subnet; cannot be assigned to a host.
- Usable hosts — Total addresses minus 2 (network and broadcast). For a /24: 256 - 2 = 254 usable host addresses.
- Wildcard mask — The inverse of the subnet mask (all ones where the mask has zeros). Used in Cisco ACLs and some firewall rules to specify ranges.
Subnetting in practice
Network engineers subnet large address blocks to improve security, performance, and management. Common scenarios include isolating servers in a DMZ (/28 or /27), separating VLANs per department, or creating point-to-point links (/30). Cloud environments like AWS VPCs and Azure VNets use CIDR-based subnetting for network segmentation between availability zones and security groups.