Calculators & converters

Subnet / CIDR calculator

Type an address with a prefix like 192.168.1.10/24 and Pip works out the whole network.

Also accepts a netmask: · ·

How subnetting works

An IP network is written as an address plus a prefix length, like 192.168.1.0/24. The prefix says how many bits at the start are the network part; the rest are for hosts. A /24 leaves 8 bits for hosts: 256 addresses, of which 254 can be given to devices (the first is the network address and the last is the broadcast address).

The same network can be written with a subnet mask – /24 is 255.255.255.0. The wildcard mask is the opposite of the subnet mask and is used in router and firewall rules.

IPv6 subnets

IPv6 has no broadcast address and networks are much larger. Home connections usually get a /56 or /64, and a single LAN is almost always a /64 – that's 18 quintillion addresses for one network.

IPv4 CIDR cheat sheet

PrefixSubnet maskWildcardAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/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

A worked example: 192.168.10.77/26

  1. /26 means the first 26 of 32 bits are the network part, leaving 6 bits for hosts.
  2. 6 host bits give 26 = 64 addresses per subnet.
  3. Subnets of 64 start at .0, .64, .128 and .192. The address .77 falls in the block that starts at .64.
  4. Network address: 192.168.10.64. Broadcast address: 192.168.10.127 (the last address in the block).
  5. Usable hosts: 192.168.10.65 to 192.168.10.126 – 62 hosts.
  6. Subnet mask: 255.255.255.192, because 256 − 64 = 192. Wildcard mask: 0.0.0.63.

Type 192.168.10.77/26 into the calculator above to check every value.

Shortcuts worth remembering

  • Block size = 256 − the interesting mask octet. For 255.255.255.224 the block size is 32, so networks start at .0, .32, .64 and so on.
  • Usable hosts = 2host bits − 2, because the network and broadcast addresses cannot be assigned. Exceptions: /31 is used for point-to-point links with two usable addresses, and /32 is a single host.
  • Each extra prefix bit halves the subnet. A /24 splits into two /25s, four /26s, eight /27s.

Planning a network

Work out how many hosts each segment needs, add room for growth, and pick the smallest block that fits. For example, an office with 40 computers, 15 phones and 6 printers could use a /26 (62 hosts) for computers, a /27 (30 hosts) for phones and a /28 (14 hosts) for printers. Allocate the largest subnets first so the blocks line up without gaps.

Learn the theory step by step in Subnetting and CIDR explained with examples.

Subnet calculator – frequently asked questions

What subnet does my home network use?

Almost always a /24 such as 192.168.1.0/24 or 192.168.0.0/24, giving 254 usable addresses. You can see it in your device’s network settings as the mask 255.255.255.0.

Which address ranges are private?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks (RFC 1918). 100.64.0.0/10 is reserved for carrier-grade NAT.

Learn more in our guides