/6 subnet calculator (252.0.0.0)
A /6 prefix fixes the first 6 bits of the address, leaving 26 bits for hosts. That gives 67,108,864 addresses in the block.
- Total addresses in the block
- 67 108 864
- Mask octet 1
- 252
- Mask octet 2
- 0
- Mask octet 3
- 0
- Mask octet 4
- 0
- Usable hosts across all the blocks
- 67 108 862
- Blocks needed for the hosts you listed
- 1
- Spare addresses in one block
- 67 108 812
- Utilisation of one block
- 0.00 %
- How many fit inside a /24
- 0
Show the working
- Number of these subnets = 1
- Hosts you need to fit = 50
- prefix = 6 = 6
- host_bits = 32 - 6 = 26
- Total addresses in the block = 2^26 = 67 108 900
- Usable hosts per subnet = 6 >= 31 ? (6 == 31 ? 2 : 1) : 67 108 900 - 2 = 67 108 900
- mask_value = 2^32 - 2^26 = 4 227 860 000
- Mask octet 1 = floor(4 227 860 000 / 2^24) = 252
- Mask octet 2 = floor(4 227 860 000 / 2^16) % 256 = 0
- Mask octet 3 = floor(4 227 860 000 / 2^8) % 256 = 0
- Mask octet 4 = 4 227 860 000 % 256 = 0
- total_addresses = 67 108 900 * 1 = 67 108 900
- Usable hosts across all the blocks = 67 108 900 * 1 = 67 108 900
- Blocks needed for the hosts you listed = 67 108 900 > 0 ? ceil(50 / 67 108 900) : 0 = 1
- Spare addresses in one block = 67 108 900 - 50 = 67 108 800
- Utilisation of one block = 67 108 900 > 0 ? 50 / 67 108 900 * 100 : 0 = 0.000 074 505 8
- How many fit inside a /24 = 6 >= 24 ? 2^(6 - 24) : 0 = 0
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- host bits = 32 - prefix length
- total addresses = 2^host bits
- usable hosts = total - 2, reserving the network and broadcast addresses
- mask = 2^32 - 2^host bits, written as four octets
The two reserved addresses are the all-zeros network address and the all-ones broadcast address.
RFC 3021 makes a /31 usable as a two-address point-to-point link with no broadcast, and a /32 is a single host route. Both are special-cased here.
This is IPv4. IPv6 does not reserve a broadcast address, so an IPv6 prefix has 2^(128 - n) usable addresses.
This prefix at a glance
| Property | Value |
|---|---|
| CIDR | /6 |
| Subnet mask | 252.0.0.0 |
| Wildcard mask | 3.255.255.255 |
| Total addresses | 67,108,864 |
| Usable hosts | 67,108,862 |
| Host bits | 26 |
Frequently asked
How many hosts are in a /6?
67,108,862 usable hosts, out of 67,108,864 total addresses.
What subnet mask is a /6?
252.0.0.0, with a wildcard mask of 3.255.255.255.
Where the numbers come from
- Address arithmetic follows RFC 4632 (CIDR) and RFC 3021 for the /31 case.