Tool guide / IP subnets

Read and split IP subnets with CIDR

A CIDR block such as 192.168.10.0/24 names a network address and how many leading bits identify the network. The remaining bits number the devices inside it. The Subnet / CIDR Calculator works this out in your browser for IPv4 and IPv6.

1. What a /24 contains

Enter any address in the network with its prefix or netmask. The calculator finds the network, broadcast address, and usable host range.

Address: 192.168.10.37
CIDR block: 192.168.10.0/24
Netmask: 255.255.255.0
Wildcard mask: 0.0.0.255
Network: 192.168.10.0
Broadcast: 192.168.10.255
Usable range: 192.168.10.1 – 192.168.10.254
Total addresses: 256
Usable hosts: 254
Address type: Private (RFC 1918)
Binary: 11000000.10101000.00001010.00100101
Integer / hex: 3232238117 · 0xC0A80A25

In IPv4, the first address names the network and the last is the broadcast address, so a /24 has 254 usable hosts. Point-to-point /31 links use both addresses, and a /32 is a single host.

2. Subnet mask cheat sheet

PrefixNetmaskWildcardAddressesUsable hosts
/16255.255.0.00.0.255.25565,53665,534
/20255.255.240.00.0.15.2554,0964,094
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Each step down in prefix length doubles the size of the network. Wildcard masks are the inverse of the netmask and appear in access lists and routing configuration.

3. Splitting a network

Choose Split into to divide a block into equal smaller subnets. Splitting 10.20.0.0/22 into /24 networks gives 4 subnets:

10.20.0.0/24
10.20.1.0/24
10.20.2.0/24
10.20.3.0/24

Plan larger subnets first and keep them aligned to their own size so ranges never overlap.

4. Private and special ranges

The calculator labels the address type. 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are private and not routed on the internet. 100.64.0.0/10 is used by carrier-grade NAT, 169.254.0.0/16 is link-local, and 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 are reserved for documentation.

5. IPv6 prefixes

IPv6 uses the same notation with 128-bit addresses. A single LAN is normally a /64, which holds 2^64 (18,446,744,073,709,551,616) addresses, so IPv6 planning counts subnets rather than hosts. Addresses are shown in the shortened form, with :: replacing the longest run of zero groups, alongside the full expanded form.

2001:db8:abcd:12::/64
2001:db8:abcd:12:: – 2001:db8:abcd:12:ffff:ffff:ffff:ffff

Related tools

Convert addresses and masks between binary, hexadecimal, and decimal with the Number Base Converter, and inspect URLs with the URL Parser. These calculators also run in the Mer Tools extension. All tools are free; optional donations support development.