Subnet & CIDR Calculator (IPv4/IPv6)
Compute network address, broadcast, mask and wildcard, usable range, address and host counts, binary and hex from an IP and CIDR prefix, with 2^k splitting, a VLSM reference and historical classes, for IPv4 and IPv6, free and in your browser.
Equal subnet splitting (2^k)
VLSM reference
Examples
Click an example to fill in the form.
| Input (IP/Prefix) | Network | Broadcast | Mask | Usable range |
|---|---|---|---|---|
| 192.168.1.130/26 | 192.168.1.128 | 192.168.1.191 | 255.255.255.192 (/26) | 192.168.1.129 – 192.168.1.190 |
| 10.0.0.5/8 | 10.0.0.0 | 10.255.255.255 | 255.0.0.0 (/8) | 10.0.0.1 – 10.255.255.254 |
| 172.16.5.9/30 | 172.16.5.8 | 172.16.5.11 | 255.255.255.252 (/30) | 172.16.5.9 – 172.16.5.10 |
| 192.168.1.7/31 | 192.168.1.6 | 192.168.1.7 | 255.255.255.254 (/31) | 192.168.1.6 – 192.168.1.7 |
| 203.0.113.45/28 | 203.0.113.32 | 203.0.113.47 | 255.255.255.240 (/28) | 203.0.113.33 – 203.0.113.46 |
Frequently asked questions
Can I type the mask instead of the prefix?
Yes. The prefix field accepts both CIDR notation (e.g., 26) and the dotted mask (e.g., 255.255.255.192), as long as the mask is contiguous — it is converted automatically to the equivalent prefix.
Why does a /31 block have two usable hosts?
Under RFC 3021, the two addresses of a /31 form a point-to-point pair: there is no reserved network or broadcast address. The same rule applies to /127 in IPv6, under RFC 6164.
What is the difference between the network and broadcast addresses?
The network address identifies the whole block (all host bits set to 0) and the broadcast address reaches every host in the block at once (host bits set to 1). Neither should be assigned to a host — except precisely in the /31 and /127 pairs.
How do the 2^k split and the VLSM reference work?
The split divides the block into 2^k equal-sized subnets — for instance, k=2 on a /24 yields four /26s. The VLSM reference lists subnets of varying sizes starting from the current block, useful for allocating networks according to each segment's demand.