IP & subnet calculator: networks, masks and addresses for IPv4 and IPv6
The subnet calculator breaks down an IPv4 or IPv6 address with prefix (CIDR) or netmask into its parts: network address, broadcast, netmask, wildcard mask, first and last usable address, and the number of addresses. It splits IPv4 networks into smaller subnets; for IPv6, it counts the /64 networks of a prefix.
The calculation is done in your browser; your inputs do not leave it.
- Example IPv4
- /24
- 254 usable addresses
- Example IPv6
- /48
- 65,536 networks /64
- Per system
- /64
- IPv6 prefix and one IPv4 address, at no extra charge
- IPv4 subnets
- /30 to /27
- from โฌ6.00 / $6.96 per month
Calculate networks and addresses
Enter an address with prefix or netmask. The result recalculates with every input, and an invalid input states the reason.
How it's calculated
An IPv4 address has 32 bits, an IPv6 address 128. The prefix indicates how many of these designate the network; the rest count the addresses in the network.
| Step | Invoice | Result |
|---|---|---|
| Network mask | 26 ones, then 6 zeros | 255.255.255.192 |
| Last octet | 100 = 01100100, mask 192 = 11000000 | 01000000 = 64 |
| Network address | Address AND netmask | 192.168.10.64 |
| Wildcard mask | NOT netmask | 0.0.0.63 |
| Broadcast | Network address OR wildcard mask | 192.168.10.127 |
| Usable from โฆ to | Network address + 1 to broadcast โ 1 | 192.168.10.65 โ 192.168.10.126 |
| Addresses | 2^(32 โ 26) | 64 |
| Usable addresses | Addresses โ 2 | 62 |
All prefixes from /8 to /32 with netmask and addresses
| Prefix | Network mask | Wildcard | Addresses | usable |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
/31 and /32
In every network up to /30, the first and last addresses are assigned as the network address and broadcast. According to RFC 3021, a /31 has neither โ both addresses serve a point-to-point connection. A /32 is a single address.
Short form for IPv6
According to RFC 5952, leading zeros of each group are omitted, and the longest sequence of at least two zero groups becomes โ::โ โ once per address. The calculator reads any valid notation and outputs the short form.
Common sizes for IPv6
| Prefix | Size | Networks /64 | Addresses |
|---|---|---|---|
| /32 | typical for allocation to a network operator | 4,294,967,296 | 2 high 96 |
| /48 | typical for a location | 65,536 | 2 high 80 |
| /56 | typical for a single connection | 256 | 2 high 72 |
| /64 | a segment | 1 | 2 high 64 |
| /128 | a single address | โ | 2 high 0 |
IP addresses at ENTRONYX CLOUD
Every system, whether dedicated server, VPS or cloud instance, comes with one IPv4 address and a /64 IPv6 prefix at no extra charge. Additional IPv4 addresses are available as a subnet; prefix and usable addresses are calculated by the same code as the calculator above.
| Subnet | Addresses | usable | Month | Note |
|---|---|---|---|---|
| /30 | 4 | 2 | โฌ6.00 / $6.96 | โ |
| /29 | 8 | 6 | โฌ14.00 / $16.24 | โ |
| /28 | 16 | 14 | โฌ27.00 / $31.32 | โ |
| /27 | 32 | 30 | โฌ52.00 / $60.32 | Proof of use required |
ENTRONYX CLOUD allocates additional IPv4 addresses according to the rules of the RIPE NCC, the address registry for Europe. A subnet loses two addresses to the network address and broadcast โ the โusableโ column deducts this.
In the private network between your servers, you determine the addressing yourself, for example with a range according to RFC 1918. The calculator above divides it into subnets.
Frequently asked questions about subnets
Seven questions about prefix, netmask and addresses. Masks and numbers are calculated by the same function as the calculator.
Can't find your question? The calculator above shows the full calculation for every input.
How many usable addresses does a /24 network have?
A /24 contains 256 addresses; the first is the network address, the last is the broadcast, so 254 are usable. Generally, 2^(32 โ prefix) โ 2 applies, with two exceptions: according to RFC 3021, a /31 has two usable addresses, a /32 exactly a.
How do I convert a network mask into a prefix?
The prefix counts the ones in the network mask in binary notation: 255.255.255.0 is 24 ones, so /24. A mask is only valid if all ones are at the front without gaps; 255.0.255.0 is therefore not a network mask.
Which IPv4 address ranges are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks; these addresses are not routed on the internet. The calculator shows for every input whether it falls within one of these ranges.
What is a wildcard mask?
The wildcard mask is the inverted network mask: 255.255.255.0 becomes 0.0.0.255. Access control lists of routers and firewalls use this to specify which bits of an address can be arbitrary.
What does /31 mean in IPv4?
A /31 has two addresses and neither a network nor a broadcast address: RFC 3021 allows both as host addresses for point-to-point links. This means a connection between two routers needs two addresses fewer than with a /30.
How many /64 networks does an IPv6 /48 contain?
A /48 contains 2^16 = 65,536 networks of size /64. A /64 is the usual size of a segment because stateless address autoconfiguration (SLAAC) requires 64 bits for the interface identifier.
Which IP addresses does a server get at ENTRONYX CLOUD?
Every system, whether dedicated server, VPS or cloud instance, includes one IPv4 address and a /64 IPv6 prefix at no extra charge. Additional IPv4 addresses are available as a subnet from /30 to /27; from a /27 upwards, allocation requires evidence of use.
/30 subnet with 4 addresses, per month net โฌ6.00 / $6.96
Addresses and private networks for your servers
Every system comes with its own addresses, you can add further IPv4 subnets, and private networks connect servers and instances. The other calculators help with storage and transfer.
- IPv6 per system
- /64
- IPv4 subnets
- /30 to /27
- per month from
- โฌ6.00 / $6.96
- Evidence from
- /27