Subnet Calculator
Enter an IP address with a CIDR prefix (e.g. 192.168.1.0/24) or a subnet mask (e.g. 10.0.0.0 255.255.0.0) to calculate all network details instantly.
Understanding Subnets and CIDR Notation
Subnetting divides a large IP network into smaller, manageable segments called subnets. Each subnet has its own address range, which improves security, reduces broadcast traffic, and allows for more efficient IP address allocation. CIDR (Classless Inter-Domain Routing) notation expresses this using a prefix length - The number after the slash indicates how many bits belong to the network portion. For a deeper introduction, read our guide on what a subnet is.
How Subnet Masks Work
A subnet mask is a 32-bit number that divides an IP address into the network part (bits set to 1) and the host part (bits set to 0). For example, a /24 mask (255.255.255.0) means the first 24 bits identify the network, leaving 8 bits for host addresses - Giving 256 total addresses and 254 usable hosts. Our FAQ explains in more detail what a subnet mask is.
Common Subnet Reference
These are the prefix lengths you will encounter most often in LAN environments:
| CIDR | Subnet Mask | Total Addresses | Usable Hosts | Use Case |
|---|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large campus / enterprise |
| /22 | 255.255.252.0 | 1,024 | 1,022 | Medium enterprise network |
| /24 | 255.255.255.0 | 256 | 254 | Standard LAN subnet |
| /25 | 255.255.255.128 | 128 | 126 | Half of a /24 - Departmental segment |
| /26 | 255.255.255.192 | 64 | 62 | Small office floor or VLAN |
| /28 | 255.255.255.240 | 16 | 14 | Small VLAN / server cluster |
Need every prefix from /8 to /32, including WAN and host routes? See the complete CIDR reference table in our CIDR Calculator.
Common Subnet Sizes in Enterprise Networks
Relative frequency of subnet prefix use in enterprise environments
Frequently Asked Questions
They represent the same information in different formats. A subnet mask like 255.255.255.0 and a CIDR prefix like /24 both mean the first 24 bits of an IP address identify the network. CIDR is more compact and is the modern standard.
Every subnet reserves its first address as the network address (e.g. 192.168.1.0) and its last address as the broadcast address (e.g. 192.168.1.255). The broadcast address is used to send packets to all hosts simultaneously. This is why a /24 has 254 usable hosts, not 256.
A wildcard mask is the bitwise complement of a subnet mask. Where the subnet mask has a 1-bit (network portion), the wildcard mask has a 0-bit, and vice versa. Wildcard masks are used in Cisco ACLs and OSPF configurations to match ranges of IP addresses.