IPv4 subnet calculator
Enter a network in CIDR notation, or an address together with its mask. We work out the mask, address range, broadcast address and host count. Everything is computed here — nothing is sent anywhere.
Examples: 192.168.1.0/24
10.0.0.0/8
172.16.5.130/26
81.2.3.4/255.255.255.240
Result for 81.2.3.0/28
28 network bits 4 host bits
| Network address | 81.2.3.0/28 |
|---|---|
| Mask | 255.255.255.240 |
| Wildcard mask | 0.0.0.15 |
| Broadcast address | 81.2.3.15 |
| Address range | 81.2.3.0 - 81.2.3.15 |
| First host | 81.2.3.1 |
| Last host | 81.2.3.14 |
| Addresses in total | 16 |
| Usable hosts | 14 |
| Legacy class | A |
Split into smaller subnets
Pick a target prefix and we will show how this network divides.
How it works
An IPv4 address is 32 bits. The mask splits them in two: the start identifies the network, the rest identifies a device within it. A /24 means the first 24 bits are the network number, leaving 8 bits for hosts — 256 addresses.
Two of those 256 are taken: the first is the network number, the last is the broadcast address. That is why a /24 gives 254 usable addresses rather than 256. The exceptions are /31 and /32, described above with the result.
Why split a network
Splitting limits broadcast traffic and keeps groups of devices apart — accounting computers away from cameras and printers, say. Smaller subnets also make firewall rules simpler: instead of listing individual addresses, one entry covers a whole range.
The prefixes you meet most often
| Prefix | Mask | Hosts | Typical use |
|---|---|---|---|
/30 |
255.255.255.252 |
2 | A link between two routers. |
/29 |
255.255.255.248 |
6 | A small block of public addresses from an ISP. |
/24 |
255.255.255.0 |
254 | An ordinary home or office network. |
/16 |
255.255.0.0 |
65 534 | A large company network split into VLANs. |
/8 |
255.0.0.0 |
16 777 214 | The whole 10.0.0.0 private range. |