tip
~/geeksubnet/masks/18

/18 subnet mask: 255.255.192.0

Every value on this page is reproducible in the calculator.

The /18 prefix means the first 18 bits of the address identify the network and the remaining 14 identify the host. Written out, the mask is 255.255.192.0, in binary 11111111.11111111.11000000.00000000, and its Cisco wildcard or inverse form is 0.0.63.255. It covers 16,384 addresses, of which 16,382 can be given to hosts.

/18 at a glance

CIDR prefix/18
Subnet mask255.255.192.0
Mask in binary11111111.11111111.11000000.00000000
Wildcard (inverse) mask0.0.63.255
Host bits14
Total addresses16,384
Usable hosts16,382
Block size (magic number)64 in octet 3

Every /18 inside 172.16.0.0/16

A 172.16.0.0/16 splits into exactly 4 subnets of this size.

NetworkFirst hostLast hostBroadcast
172.16.0.0/18172.16.0.1172.16.63.254172.16.63.255
172.16.64.0/18172.16.64.1172.16.127.254172.16.127.255
172.16.128.0/18172.16.128.1172.16.191.254172.16.191.255
172.16.192.0/18172.16.192.1172.16.255.254172.16.255.255

The magic number for /18

Take the interesting octet of the mask, the one that is neither 255 nor 0. For /18 that is 192 in octet 3. Subtract it from 256:

256 - 192 = 64

That is the block size. Every /18 network address is a multiple of 64 in octet 3, so you can list them by counting: 0, 64, 128, 192, and so on. No binary needed once you know the number.

Where a /18 shows up in practice

A /18 holds 16,382 usable addresses, a quarter of a /16. It is a reasonable size for a whole building or a large cloud subnet, and a common size for the block an ISP assigns to a substantial business customer.

Frequently asked questions

How many hosts are in a /18?

A /18 holds 16,384 addresses in total. After reserving the network and broadcast addresses, 16,382 are usable by hosts.

What is the subnet mask for /18?

The /18 subnet mask is 255.255.192.0 in dotted-decimal notation.

What is the wildcard mask for /18?

The wildcard mask, also called the inverse mask, is 0.0.63.255. It is the bitwise inverse of 255.255.192.0 and is what Cisco access lists and OSPF network statements expect.

What is /18 in binary?

The /18 mask written out bit by bit is 11111111.11111111.11000000.00000000: 18 ones followed by 14 zeros.

Neighbouring masks: /17 is one bit shorter and holds twice as many addresses. /19 is one bit longer and holds half as many.
full cheat sheet subnetting basics open the calculator