/12 subnet: mask 255.240.0.0, 1,048,576 addresses
Everything about a /12 network, with the CIDR calculator pre-filled — change the IP to calculate your own block.
Enter a CIDR range above to calculate
Is an IP inside a CIDR block?
Yes — 10.0.42.7 is inside 10.0.0.0/16.
Do two CIDR blocks overlap?
Overlap — 10.0.128.0/20 sits inside 10.0.0.0/16 (10.0.128.0 – 10.0.143.255).
CIDR blocks never partly overlap: one is inside the other, or they don't touch at all. Overlapping VPCs can't be peered.
/12 at a glance
- Subnet mask
- 255.240.0.0
- Wildcard mask
- 0.15.255.255
- Mask in binary
- 11111111.11110000.00000000.00000000
- Host bits
- 20
- Total addresses
- 1,048,576
- Usable hosts
- 1,048,574 (network and broadcast address excluded)
- Equivalent /24 networks
- 4,096
172.16.0.0/12 is the middle private range (172.16.0.0–172.31.255.255). Docker picks its default bridge networks from it.
Splitting a /12 into smaller subnets
Frequently asked
What is the subnet mask for /12?
255.240.0.0. The first 12 bits are network bits and the remaining 20 are host bits; the wildcard (inverse) mask is 0.15.255.255.
How many IP addresses are in a /12?
1,048,576 in total. 1,048,574 of them can be assigned to hosts, because the first is the network address and the last is the broadcast address.
CIDR to subnet mask cheat sheet
| CIDR | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |