Subnet Calculator |
Click a bit to move the prefix
Subnet Calculator — What the Results Tell You
Subnet calculation applies a binary mask — defined by the CIDR prefix length — to an IPv4 address to produce four network parameters: the network address (first address in the block), the broadcast address (last address), the subnet mask in dotted-decimal notation, and the usable host range. CIDR prefix lengths run from /8 (16,777,214 usable hosts) to /30 (2 usable hosts). Prefixes /31 and /32 are special cases defined in RFC 3021 and RFC 950 respectively.
| CIDR Prefix | Subnet Mask | Total Addresses | Usable Hosts | Common Use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A — large enterprise or ISP |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Class B — campus network |
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN — home and office |
| /26 | 255.255.255.192 | 64 | 62 | Small office segment |
| /28 | 255.255.255.240 | 16 | 14 | Small VLAN or DMZ |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point link (traditional) |
| /31 | 255.255.255.254 | 2 | 2 | Point-to-point link (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 (host route) | Loopback or single-host ACL |
What Does Each Result Field Mean?
| Field | Meaning | Example (/24) |
|---|---|---|
| Network Address | First address in the subnet — identifies the network, cannot be assigned to a host | 192.168.1.0 |
| Usable Host Range | First and last addresses assignable to hosts — the range between network and broadcast | 192.168.1.1 – 192.168.1.254 |
| Broadcast Address | Last address in the subnet — delivers a packet to all hosts in the subnet, cannot be assigned to a host | 192.168.1.255 |
| Subnet Mask | 32-bit mask in dotted-decimal notation indicating which bits are network bits | 255.255.255.0 |
| Wildcard Mask | Bitwise inverse of the subnet mask — used in Cisco ACLs and OSPF area statements | 0.0.0.255 |
| Total Hosts | All addresses in the block, including network and broadcast | 256 |
| Usable Hosts | Assignable addresses — total minus 2, except /31 (RFC 3021) and /32 | 254 |
How to Use the IPv4 Subnet Calculator
Type or paste an IPv4 address, for example 192.168.1.10. You can paste it with its prefix (192.168.1.10/24) or its subnet mask (192.168.1.10 255.255.255.0); results update as you type.
Split the Network or Check an IP
Read the Results Table
Interpret /31 and /32 Prefixes
How IPv4 Subnetting Works — Technical Details
IPv4 subnetting (RFC 950, 1985) divides a 32-bit address into a network prefix and a host identifier by applying a binary AND operation between the IP address and the subnet mask. The network address is the result of that AND. The broadcast address is produced by applying the wildcard mask — the bitwise inverse of the subnet mask — to the network address with a binary OR operation.
CIDR (Classless Inter-Domain Routing, RFC 4632) replaced the original Class A/B/C system and allows prefix lengths of any value from /0 to /32, enabling variable-length subnet masking (VLSM). A /24 prefix allocates 28 = 256 addresses; a /16 allocates 216 = 65,536; a /8 allocates 224 = 16,777,216.
The /31 prefix is a special case defined in RFC 3021 (2000) for point-to-point links between two routers. Standard subnetting would subtract a network address and broadcast address, leaving 0 usable hosts. RFC 3021 eliminates the broadcast requirement for /31 networks, making both addresses usable. This is widely deployed on backbone router-to-router links to conserve public address space.
The three private IPv4 address blocks defined in RFC 1918 — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — may be subnetted without restriction. Routers on the public internet will not forward packets sourced from or destined to these ranges.
On Linux and macOS, the ipcalc utility performs equivalent calculations at the
command line: ipcalc 192.168.1.0/24 returns network address, broadcast, netmask,
and host range. This tool produces the same output interactively in the browser with no
software installation required.
Common Uses for a Subnet Calculator
Network capacity planning. A network engineer allocating address space across three office floors — each requiring 50 hosts — needs to choose an appropriate CIDR prefix. A /26 (62 usable hosts) fits the requirement with headroom; a /25 (126 usable hosts) is wasteful for 50 devices. The calculator shows the exact range and host count for any prefix without manual binary arithmetic.
Cloud VPC subnet design. A cloud architect configuring AWS, Azure, or GCP VPC subnets must define non-overlapping CIDR blocks for each availability zone. A mistake — such as assigning 10.0.1.0/24 and 10.0.1.128/25 to two subnets — creates an overlap that breaks routing. The subnet calculator confirms network address and broadcast boundaries before any infrastructure is provisioned.
Certification exam preparation. A student studying for the CompTIA Network+ or Cisco CCNA exam uses the calculator to verify manual subnet calculations. The interactive bit visualizer directly shows which bits shift as the prefix length changes — reinforcing the binary logic that exam questions test.