Subnet Calculator
Calculate network details from CIDR notation
Examples: 192.168.1.0/24, 10.0.0.0/8, 172.16.0.0/16
Common Subnet Reference
| CIDR | Subnet Mask | Usable Hosts | Description |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | Single host |
| /31 | 255.255.255.254 | 2 | Point-to-point link |
| /30 | 255.255.255.252 | 2 | Smallest usable subnet |
| /29 | 255.255.255.248 | 6 | Small subnet |
| /28 | 255.255.255.240 | 14 | Small office |
| /27 | 255.255.255.224 | 30 | Medium office |
| /26 | 255.255.255.192 | 62 | Large office |
| /25 | 255.255.255.128 | 126 | Half Class C |
| /24 | 255.255.255.0 | 254 | Class C |
| /23 | 255.255.254.0 | 510 | 2 Class C |
| /22 | 255.255.252.0 | 1,022 | 4 Class C |
| /21 | 255.255.248.0 | 2,046 | 8 Class C |
| /20 | 255.255.240.0 | 4,094 | 16 Class C |
| /16 | 255.255.0.0 | 65,534 | Class B |
| /8 | 255.0.0.0 | 16,777,214 | Class A |
About Subnet Calculators
A subnet calculator helps you divide IP networks into smaller subnetworks. Subnetting is essential for efficient IP address management, network security, and reducing broadcast traffic.
Key Concepts
The first address in a subnet, identifying the network itself. All host bits are set to 0.
The last address in a subnet, used to send data to all hosts. All host bits are set to 1.
Separates the network portion from the host portion of an IP address using a bitmask.
The inverse of the subnet mask. Used in ACLs and routing protocols to match IP ranges.
Classless Inter-Domain Routing notation uses a slash and number (e.g., /24) to define the prefix length.
Legacy classification: Class A (0-127), B (128-191), C (192-223), D (multicast), E (reserved).
Common Use Cases
- Planning network segments for offices and data centers
- Configuring firewall rules and access control lists (ACLs)
- Determining available host addresses in a subnet
- Troubleshooting network connectivity issues
- Studying for network certification exams (CCNA, CompTIA)
Related tools: Look up any IP address location with our IP Lookup tool. Find DNS records for any domain, or check your own IP address.
Frequently Asked Questions
What is a subnet?
A subnet (subnetwork) is a logical division of an IP network. Subnetting breaks a large network into smaller, more manageable segments. Each subnet has its own range of IP addresses, network address, and broadcast address.
What does CIDR notation mean?
CIDR (Classless Inter-Domain Routing) notation like /24 or /16 specifies how many bits of the IP address are used for the network portion. A /24 subnet has 256 addresses (254 usable), while a /16 has 65,536 addresses.
How do I calculate the number of hosts in a subnet?
The formula is 2^(32-prefix) - 2 for IPv4. Subtract 2 because the network address and broadcast address cannot be assigned to hosts. For example, a /24 gives 2^8 - 2 = 254 usable host addresses.
What is the difference between a subnet mask and CIDR?
They represent the same information differently. A subnet mask like 255.255.255.0 is the same as /24 in CIDR notation. CIDR is more compact and widely used in modern networking. Our calculator converts between both formats.
More Tools