/18 subnet
A /18 has a subnet mask of 255.255.192.0 and 16,382 usable hosts.
The numbers
| Prefix length | /18 |
| Subnet mask | 255.255.192.0 |
| Wildcard mask | 0.0.63.255 |
| Network bits | 18 |
| Host bits | 14 |
| Total addresses | 16,384 |
| Usable hosts | 16,382 |
| /24 networks contained | 64 |
Where a /18 is used
A quarter of a /16. A typical cloud subnet where 16,000 addresses is the right order of magnitude.
Why the usable count is what it is
A /18 leaves 14 bits for hosts, giving 214 = 16,384 addresses. Two of those cannot be assigned to a machine: the one with all host bits set to zero is the network address, which names the subnet itself, and the one with all host bits set to one is the broadcast address. That leaves 16,382.
Binary layout
mask 11111111.11111111.11000000.00000000
^^^^^^^^^^^^^^^^^^
18 network bits, 14 host bits
Splitting and combining
| Prefix | Usable hosts | Relationship | |
|---|---|---|---|
| Twice the size | /17 | 32,766 | Two /18 networks combine into one /17 |
| This network | /18 | 16,382 | — |
| Half the size | /19 | 8,190 | One /18 splits into two /19 networks |
| A quarter | /20 | 4,094 | Four /20 networks fit in a /18 |
Frequently asked questions
How many hosts are in a /18?
16,384 addresses in total, of which 16,382 are usable. The first is the network address and the last is the broadcast address, so two are always lost.
What is the subnet mask for /18?
255.255.192.0. The prefix length is the count of leading 1 bits in the mask, so /18 is 18 ones followed by 14 zeros.
What is the wildcard mask for /18?
0.0.63.255 — the bitwise inverse of the subnet mask. Cisco access lists and OSPF network statements take the wildcard rather than the mask; a zero bit must match and a one bit is ignored.
How does a /18 compare to a /24?
A /18 is 64 times larger than a /24 — it contains 64 of them.