
Subnet mask and CIDR prefix length
A subnet is a block of IP addresses that share the same leading bits. The subnet mask marks those bits with ones: 255.255.255.0 has 24 of them. CIDR notation writes that count after a slash, so 192.168.1.0/24 and 192.168.1.0 with mask 255.255.255.0 name the same network. You will also see the number after the slash called the prefix length.
The bits after the prefix belong to hosts. A /26 leaves 6 bits, which gives 64 addresses: the first is the network address and the last is the broadcast, so 62 are usable. IPv4 results show the mask in binary, so you can see where the network bits end.
A /31 and a /32 break that rule: a /31 point-to-point link uses both of its addresses, and a /32 is a single host. The wildcard mask is the mask with its bits flipped, 0.0.0.63 for a /26. Cisco access lists and OSPF network statements take it in place of the mask.
For an IPv6 prefix such as 2001:db8::/48 you get the network, the first and last address, the address count and the type. The Split into list works on IPv4: pick a prefix 1 to 8 bits longer and the page lists up to 256 subnets, each linked to its own calculation.
The IP address converter on this page turns an address into decimal and hex, IPv4 into binary, and IPv6 into its full and compressed forms. It also turns a number back into an IP. The range block converts a CIDR block to an IP range with an address list, and an IP range back into CIDR blocks.
When you need it
- Allow a whole office network in the IP authorization of your proxies
- Check that two ranges from a provider do not overlap
- Plan subnets for servers, VPN and guest Wi-Fi
- Turn a mask like 255.255.255.224 into a prefix and back
- Get the address list of a /28 to paste into a firewall allowlist
Subnetting example: splitting 192.168.1.0/24 into four /26 networks
Take 192.168.1.0/24 and borrow 2 host bits. The prefix grows to /26, the mask becomes 255.255.255.192, and you get four networks of 64 addresses with 62 usable hosts each. 192.168.1.0/26 covers hosts .1 to .62 with broadcast .63. 192.168.1.64/26 runs from .65 to .126 with broadcast .127, 192.168.1.128/26 from .129 to .190 with broadcast .191, and 192.168.1.192/26 from .193 to .254 with broadcast .255. To repeat it here, enter 192.168.1.0/24, choose /26 in the Split into list and open any of the four links.
Private IP ranges, CGNAT and other special addresses
RFC 1918 reserves three private IPv4 ranges: 10.0.0.0/8 with 16,777,216 addresses, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) with 1,048,576, and 192.168.0.0/16 with 65,536. Providers use 100.64.0.0/10 from RFC 6598 for carrier-grade NAT. A Windows or Mac computer that gets no DHCP answer assigns itself a link-local address from 169.254.0.0/16. Loopback takes 127.0.0.0/8 and multicast takes 224.0.0.0/4. RFC 5737 sets aside 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 for documentation, and the calculator marks 0.0.0.0/8 and 240.0.0.0/4 as reserved. In IPv6 it recognizes loopback ::1, unique local fc00::/7, link-local fe80::/10, multicast ff00::/8 and documentation 2001:db8::/32. The Type field shows which of these ranges your address falls into.