🧮 IPv4 Subnet Calculator
Enter an IPv4 address with a CIDR prefix or subnet mask to get the full breakdown: network, broadcast, usable range, wildcard mask, and binary form. Handles /31 and /32 correctly.
Input
Results
Binary Representation
| Field | Binary |
|---|---|
| IP Address | — |
| Subnet Mask | — |
| Network | — |
| Broadcast | — |
How It Works
The calculator combines your IP address with the subnet mask (converted from CIDR if needed) using a bitwise AND to find the network address, then inverts the mask to find the broadcast address. Everything between those two — minus the network and broadcast themselves — is the usable host range.
Special cases: a /31 network (RFC 3021) has no separate network or broadcast address — both addresses are usable, commonly used for point-to-point links. A /32 identifies exactly one host with no broadcast at all. The calculator reports these correctly instead of blindly subtracting 2.
Examples & Common Use Cases
- 192.168.1.10/24 → network 192.168.1.0, broadcast 192.168.1.255, 254 usable hosts.
- 10.0.0.1/30 → a tiny 4-address subnet with 2 usable hosts, common for router links.
- 203.0.113.5/31 → both addresses usable, no broadcast — typical for WAN point-to-point links.
- 198.51.100.7/32 → a single host route.