Subnet calculator (CIDR)
Calculate an IPv4 network from an address and prefix. See its mask, address range, and mathematical host count.
Input is processed in your browser and is not sent to the server.
Quick start
- Enter an IPv4 address and prefix.
- Review the range and address count.
- Exclude reserved addresses before allocation.
Example: 192.168.1.25/24
| Field | Value | Meaning |
|---|---|---|
| Network | 192.168.1.0/24 | The containing block |
| Mask | 255.255.255.0 | 24 network bits |
| Total | 256 addresses | 2^(32−24) |
| Typical host range | 192.168.1.1–192.168.1.254 | Excludes network and broadcast |
| Broadcast | 192.168.1.255 | Last address in a conventional subnet |
Actual allocation
For conventional /0–/30 calculations, the first and last addresses are excluded. /31 allows two addresses on supported point-to-point links; /32 identifies a single address.
This is a mathematical calculation. It cannot identify addresses reserved by a cloud provider, router, or an existing allocation. /31 is not a promise that both addresses work on every LAN.
Private does not mean every other address is public
RFC1918 defines 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Loopback, documentation, multicast, and other special ranges also exist.
Classification applies to the input IP, not every address in a large CIDR block. Unclassified addresses are not automatically reachable from the internet.
Splitting a /24 into four /26 subnets
To split one /24 by purpose, lengthen the prefix by 2 to get four subnets of the same size. Each /26 has 64 addresses and 62 usable hosts in the usual case.
| Subnet | Host range | Broadcast |
|---|---|---|
| 192.168.10.0/26 | 192.168.10.1 ~ 192.168.10.62 | 192.168.10.63 |
| 192.168.10.64/26 | 192.168.10.65 ~ 192.168.10.126 | 192.168.10.127 |
| 192.168.10.128/26 | 192.168.10.129 ~ 192.168.10.190 | 192.168.10.191 |
| 192.168.10.192/26 | 192.168.10.193 ~ 192.168.10.254 | 192.168.10.255 |
Enter the network address of any row into this calculator to see the same range.
Addresses you can actually use in a cloud subnet
Cloud providers reserve some addresses in every subnet for the gateway, DNS and similar functions. The same /24 therefore offers a different number of assignable addresses on each provider.
| Provider | Reserved addresses | Assignable in a /24 |
|---|---|---|
| AWS | First 4 and last 1 (5) | 251 |
| Microsoft Azure | First 4 and last 1 (5) | 251 |
| Google Cloud | First 2 and last 2 (4) | 252 |
| Oracle Cloud (OCI) | First 2 and last 1 (3) | 253 |
The smaller the subnet, the bigger the difference. The smallest AWS subnet, a /28, offers only 11 of its 16 addresses.