Networking / Guide

Subnet mask cheat sheet from /8 to /32

The reference table of every prefix from /8 to /32: mask, wildcard mask, number of addresses, usable machines and block size, with the method to use it.

Networking Guide All levels Published October 20, 2026 Translated October 27, 2026 4 min read Version française
Open notebook with a pen and pencils on a desk
Photo: Clay Banks on Unsplash

In plain words

A page to keep at hand: for each network size, each line gives its mask, how many machines it can hold and the gap between two networks of that size. To understand where these figures come from, see subnet masks and CIDR notation.

How to read the table

Column What it gives
Prefix The network size in CIDR notation
Mask The same network in classic notation
Wildcard Used in Cisco access lists and OSPF (wildcard mask)
Addresses The total number of addresses in the network
Machines The addresses you can give to machines (total minus the network address and the broadcast address)
Block The gap between two consecutive networks of this size; in brackets, the byte it applies to
vs /24 The size compared with a /24, the usual home network (1/4 = a quarter of a /24)

The table

Prefix Mask Wildcard Addresses Machines Block vs /24
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214 1 (1st) 65,536 × /24
/9 255.128.0.0 0.127.255.255 8,388,608 8,388,606 128 (2nd) 32,768 × /24
/10 255.192.0.0 0.63.255.255 4,194,304 4,194,302 64 (2nd) 16,384 × /24
/11 255.224.0.0 0.31.255.255 2,097,152 2,097,150 32 (2nd) 8,192 × /24
/12 255.240.0.0 0.15.255.255 1,048,576 1,048,574 16 (2nd) 4,096 × /24
/13 255.248.0.0 0.7.255.255 524,288 524,286 8 (2nd) 2,048 × /24
/14 255.252.0.0 0.3.255.255 262,144 262,142 4 (2nd) 1,024 × /24
/15 255.254.0.0 0.1.255.255 131,072 131,070 2 (2nd) 512 × /24
/16 255.255.0.0 0.0.255.255 65,536 65,534 1 (2nd) 256 × /24
/17 255.255.128.0 0.0.127.255 32,768 32,766 128 (3rd) 128 × /24
/18 255.255.192.0 0.0.63.255 16,384 16,382 64 (3rd) 64 × /24
/19 255.255.224.0 0.0.31.255 8,192 8,190 32 (3rd) 32 × /24
/20 255.255.240.0 0.0.15.255 4,096 4,094 16 (3rd) 16 × /24
/21 255.255.248.0 0.0.7.255 2,048 2,046 8 (3rd) 8 × /24
/22 255.255.252.0 0.0.3.255 1,024 1,022 4 (3rd) 4 × /24
/23 255.255.254.0 0.0.1.255 512 510 2 (3rd) 2 × /24
/24 255.255.255.0 0.0.0.255 256 254 1 (3rd) 1 × /24
/25 255.255.255.128 0.0.0.127 128 126 128 (4th) 1/2
/26 255.255.255.192 0.0.0.63 64 62 64 (4th) 1/4
/27 255.255.255.224 0.0.0.31 32 30 32 (4th) 1/8
/28 255.255.255.240 0.0.0.15 16 14 16 (4th) 1/16
/29 255.255.255.248 0.0.0.7 8 6 8 (4th) 1/32
/30 255.255.255.252 0.0.0.3 4 2 4 (4th) 1/64
/31 255.255.255.254 0.0.0.1 2 2 2 (4th) 1/128
/32 255.255.255.255 0.0.0.0 1 1 1 (4th) 1/256

For /31 and /32, both addresses (or the single address) are usable: a /31 is used for links between two routers (RFC 3021), a /32 designates a single machine.

The lines to know by heart

Prefix Mask Machines Where you meet it
/8 255.0.0.0 16,777,214 Private range 10.0.0.0/8
/16 255.255.0.0 65,534 Private range 192.168.0.0/16
/24 255.255.255.0 254 Almost every home network
/26 255.255.255.192 62 Medium-sized VLAN
/27 255.255.255.224 30 Small VLAN
/30 255.255.255.252 2 Link between two routers
/32 255.255.255.255 1 A single machine (firewall rules)

Using the block size

The block size lets you find, in your head, the network an address belongs to. Networks of a given size always start on a multiple of the block size.

Example: which network does 192.168.1.130/26 belong to?

  1. Block size of a /26: 64, on the 4th byte.
  2. Multiples of 64: 0, 64, 128, 192.
  3. 130 lies between 128 and 191: the network is 192.168.1.128/26.
  4. The next network starts at 192: so the broadcast address is 192.168.1.191.
  5. Usable machines: from 192.168.1.129 to 192.168.1.190.

Same method when the block size falls on the 3rd byte: for 10.0.37.5/20, the block size is 16 on the 3rd byte. The multiples of 16 are 0, 16, 32, 48: the network is 10.0.32.0/20, its broadcast 10.0.47.255.

A memory aid for the last byte

Mask values from /25 to /32 follow each other by adding decreasing powers of 2: 128, then 128 + 64 = 192, + 32 = 224, + 16 = 240, + 8 = 248, + 4 = 252, + 2 = 254, + 1 = 255. The block size is simply 256 minus that value.

Key takeaways

  • Usable machines: 2^(32 − prefix) − 2, except /31 (2) and /32 (1).
  • Block size = 256 − the value of the last non-zero byte of the mask.
  • A network always starts on a multiple of its block size.

Read next