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:

CIDRSubnet MaskTotal AddressesUsable HostsUse Case
/16255.255.0.065,53665,534Large campus / enterprise
/22255.255.252.01,0241,022Medium enterprise network
/24255.255.255.0256254Standard LAN subnet
/25255.255.255.128128126Half of a /24 - Departmental segment
/26255.255.255.1926462Small office floor or VLAN
/28255.255.255.2401614Small 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

/24 (254 hosts)
Most common
/16 (65K hosts)
Campus/HQ
/22 (1K hosts)
Medium office
/28 (14 hosts)
Server VLANs
/30 (2 hosts)
WAN links
/32 (1 host)
Host routes

Frequently Asked Questions

What is the difference between a subnet mask and a CIDR prefix?

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.

Why are 2 addresses always reserved in a subnet?

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.

What is a wildcard mask?

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.

Related Tools