Calculator
Example Data
| IP | Prefix | Subnet Mask | Network | Broadcast | Usable Hosts |
|---|---|---|---|---|---|
| 192.168.10.50 | /24 | 255.255.255.0 | 192.168.10.0 | 192.168.10.255 | 254 |
| 10.4.8.9 | /20 | 255.255.240.0 | 10.4.0.0 | 10.4.15.255 | 4094 |
| 172.16.5.10 | /31 | 255.255.255.254 | 172.16.5.10 | 172.16.5.11 | 2 |
Formula Used
- Mask from prefix: mask = 2^32 − 2^(32−prefix) (bitwise: leading 1s, then 0s).
- Network address: network = ip AND mask.
- Wildcard mask: wildcard = NOT mask.
- Broadcast address: broadcast = network OR wildcard.
- Total addresses: 2^(32−prefix). Usable hosts typically total−2, except /31 and /32.
- Subnetting to a new prefix: subnet_count = 2^(new_prefix−prefix), block size 2^(32−new_prefix).
How to Use
- Enter any IPv4 address inside the target network.
- Provide either a CIDR prefix or a dotted subnet mask.
- Optional: add required hosts to get a suggested prefix.
- Optional: enter a new prefix to split the network.
- Click Calculate to view results above the form.
- Use CSV or PDF to share results with your team.
FAQs
1) What does CIDR mean in subnetting?
CIDR uses a /prefix to mark network bits, independent of legacy classes. It enables efficient address allocation and flexible subnet sizing for modern networks.
2) Why are network and broadcast addresses reserved?
In standard subnets, the first address identifies the network, and the last is used for broadcast. Hosts typically use the addresses in between.
3) Are /31 and /32 special cases?
Yes. A /32 represents a single host route. A /31 is commonly used for point‑to‑point links, where both addresses can be treated as usable.
4) How is the subnet mask derived from a prefix?
The prefix sets that many leading bits to 1 and the rest to 0. Converting those bits into dotted decimal produces the subnet mask.
5) Can I enter only a subnet mask?
Yes. The tool validates the mask as contiguous, converts it to a prefix, and then calculates network, broadcast, and usable host range.
6) What does “Required Hosts” do?
It suggests the smallest prefix whose total addresses can accommodate your host count plus reserved addresses. It helps plan subnets without guessing.
7) Why limit the number of displayed subnets?
Subnet tables can explode in size quickly. The “Show first N” setting keeps the page fast while still letting you preview the early subnets.