Understanding subnets and CIDR
An IP address consists of a network part and a host part. The prefix in CIDR notation, such as /24, states how many bits from the left belong to the network. The remaining bits address the devices in that network.
Network address, broadcast and usable hosts
The network address has all host bits set to 0. In IPv4 the broadcast address has all host bits set to 1. Neither can be assigned to a device, so an IPv4 network has 2(32−prefix) − 2 usable addresses. Exceptions: in a /31 both addresses are usable according to RFC 3021 (point-to-point links), and a /32 describes exactly one host.
Netmask and wildcard mask
The netmask writes the prefix as an address: /24 equals 255.255.255.0. The wildcard mask is its inverse (0.0.0.255) and is mainly used in Cisco ACLs and OSPF configurations. The calculator accepts both.
Common IPv4 prefixes
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
/12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
/16 | 255.255.0.0 | 65,536 | 65,534 |
/20 | 255.255.240.0 | 4,096 | 4,094 |
/22 | 255.255.252.0 | 1,024 | 1,022 |
/23 | 255.255.254.0 | 512 | 510 |
/24 | 255.255.255.0 | 256 | 254 |
/25 | 255.255.255.128 | 128 | 126 |
/26 | 255.255.255.192 | 64 | 62 |
/27 | 255.255.255.224 | 32 | 30 |
/28 | 255.255.255.240 | 16 | 14 |
/29 | 255.255.255.248 | 8 | 6 |
/30 | 255.255.255.252 | 4 | 2 |
/31 | 255.255.255.254 | 2 | 2 |
/32 | 255.255.255.255 | 1 | 1 |
Private and special address ranges
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16: private networks per RFC 1918, not routed on the internet.100.64.0.0/10: shared address space for carrier-grade NAT (CGNAT) at ISPs.169.254.0.0/16: link-local, self-assigned when no DHCP server answers.192.0.2.0/24,198.51.100.0/24,203.0.113.0/24: reserved for documentation and examples.
IPv6 subnetting
IPv6 has no broadcast, and the usual size of a LAN segment is /64 because SLAAC uses the lower 64 bits for the interface identifier. ISPs typically delegate a /56 (256 networks) or /48 (65,536 networks) to customers. Private IPv6 networks come from fd00::/8 (unique local addresses).
Reverse DNS zones
Reverse lookups use zones below in-addr.arpa or ip6.arpa. They follow octet boundaries (IPv4) or nibble boundaries (IPv6). If the prefix falls in between, the calculator shows the enclosing zone. Smaller IPv4 networks are delegated using RFC 2317.
FAQ
How many hosts fit in a /24 network?
A /24 has 256 addresses. The network address and broadcast are reserved, leaving 254 usable host addresses.
What is the difference between a netmask and a wildcard mask?
The netmask has ones for the network part (255.255.255.0); the wildcard mask is its bitwise inverse (0.0.0.255). Cisco ACLs and OSPF use wildcard masks, most other systems use the netmask.
Why does a /31 have no broadcast address?
RFC 3021 allows /31 networks for point-to-point links. Since only two devices are involved, both addresses are used as host addresses and there is no network or broadcast address.
How do I summarize several networks into one route?
Paste the networks into the “Summarize” tab. The calculator merges overlapping and adjacent ranges and outputs the smallest list of CIDR blocks. It also shows the smallest common supernet and how many extra addresses it would include.
Is my input transmitted?
No. All calculations run in your browser. The share link stores the input in the part after the #, which the browser never sends to the server.