Subnet Calculator
Calculate network address, host range, broadcast, and subnet mask from any CIDR
Common Subnet Reference
| CIDR | Subnet Mask | Addresses | Usable Hosts | Common Use |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 | Single host |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point link |
| /28 | 255.255.255.240 | 16 | 14 | Small department |
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN |
| /22 | 255.255.252.0 | 1,024 | 1,022 | Medium office |
| /20 | 255.255.240.0 | 4,096 | 4,094 | Large campus |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Enterprise |
| /8 | 255.0.0.0 | 16.7M | 16.7M | Class A (legacy) |
Subnetting Explained Without the Jargon
Every device on a network needs an IP address, and subnetting is how network engineers divide a large pool of addresses into smaller, manageable groups. Think of it like apartment numbering — the building address gets you to the right building (the network), and the apartment number gets you to the right unit (the host). Subnetting defines where the building address ends and the apartment number begins.
A subnet mask separates the network portion of an IP address from the host portion. In 192.168.1.100 with a /24 mask (255.255.255.0), the first three octets (192.168.1) identify the network, and the last octet (.100) identifies the specific device. Every device on this subnet shares the same network prefix and can communicate directly without routing through a gateway.
CIDR Notation: What the /24 Means
CIDR (Classless Inter-Domain Routing) replaced the old Class A/B/C system in 1993 and is now the universal standard. The number after the slash tells you how many bits of the 32-bit IP address are used for the network portion. A /24 means 24 bits for the network (the first three octets) and 8 bits for hosts, giving 256 total addresses (2^8) of which 254 are usable (network and broadcast addresses are reserved).
The relationship between CIDR prefix and available hosts follows a simple pattern: every additional bit in the prefix halves the number of hosts. /24 gives 254 hosts, /25 gives 126, /26 gives 62, /27 gives 30, and so on. Going the other direction, /23 gives 510 hosts, /22 gives 1,022. This calculator shows you the exact numbers for any prefix length.
Private IP Ranges You Should Know
Three address ranges are reserved for private networks and will never appear on the public internet. 10.0.0.0/8 provides 16.7 million addresses and is commonly used in large corporate networks and cloud environments (AWS uses this range extensively). 172.16.0.0/12 provides about a million addresses and sees use in medium enterprises. 192.168.0.0/16 provides 65,534 addresses and is what your home router almost certainly uses — the familiar 192.168.1.x or 192.168.0.x addresses on your local network.
Why Subnetting Matters in the Real World
Beyond certification exams, subnetting has practical daily applications. Cloud architects subnet VPCs to isolate production from development environments. Network engineers use subnets to control broadcast domains and reduce congestion. Security teams use subnet boundaries to enforce firewall rules and access control lists. DevOps engineers configure container networking with precise subnet allocation. Even home users benefit from understanding that their 192.168.1.0/24 network supports 254 devices — relevant when smart home setups start pushing that limit with dozens of IoT devices.
What is the difference between /24 and 255.255.255.0?
They mean exactly the same thing. /24 is CIDR notation indicating 24 network bits. 255.255.255.0 is the dotted-decimal representation of the same mask. CIDR notation is more compact and is the modern standard, but both are used interchangeably in networking.
Why are network and broadcast addresses not usable?
The network address (all host bits set to 0) identifies the subnet itself and cannot be assigned to a device. The broadcast address (all host bits set to 1) is used to send packets to every device on the subnet simultaneously. This is why a /24 subnet has 256 total addresses but only 254 usable for hosts.
How do I choose the right subnet size?
Count the devices that need IP addresses, add 20-30% for growth, then pick the smallest subnet that accommodates that number. Overly large subnets waste address space and increase broadcast traffic. A department of 40 people needs a /26 (62 hosts) rather than a /24 (254 hosts) — the extra addresses serve no purpose and create a larger broadcast domain.