IP Subnet Calculator
192.168.1.10/24
| Property | Value |
|---|---|
| IP Address (binary) | |
| Subnet Mask (binary) | |
| Network Address (binary) | |
| IP Class |
How CIDR Subnetting Works
This calculator implements standard IPv4 CIDR (Classless Inter-Domain Routing) math. A /n prefix length means the first n bits of the 32-bit address are the network portion and the remaining (32 - n) bits identify hosts within that network. The subnet mask is built by setting the leftmost n bits to 1 and the rest to 0 (e.g. /24 = 255.255.255.0). The network address is found by applying a bitwise AND between the IP address and the subnet mask, and the broadcast address is found by setting every host bit in the network address to 1 (equivalent to the network address OR the wildcard mask, where the wildcard mask is the bitwise complement of the subnet mask).
Usable Hosts and the /31, /32 Special Cases
For a network with h host bits, the total address space is 2h addresses, but ordinarily two of those are reserved — the all-zeros network address and the all-ones broadcast address — leaving 2h - 2 usable host addresses. This calculator applies that formula for every prefix from /0 through /30. Two exceptions carved out by RFC 3021 and common routing practice: a /31 network (2 addresses, 0 host bits reserved) is treated as a point-to-point link where both addresses are usable, and a /32 network is a single host route with exactly one usable address and no broadcast address at all.
Related Networking Tools
If you're troubleshooting a connection instead of planning address space, the bandwidth calculator can help estimate transfer times and link capacity, and Base64 encode/decode is handy for the credential and payload encoding that often accompanies network configuration work.
Frequently Asked Questions
Why does a /31 subnet show 2 usable hosts instead of 0?
Normally a subnet reserves one address for the network and one for broadcast, leaving 2^(host bits) - 2 usable. But RFC 3021 defines /31 networks specifically for point-to-point links, where both addresses in the 2-address block are treated as usable host addresses and there is no broadcast address.
What's the difference between the subnet mask and the wildcard mask?
The subnet mask marks network bits with 1s and host bits with 0s (e.g. 255.255.255.0 for /24). The wildcard mask is its bitwise complement (0.0.0.255 for /24) and is used by tools like Cisco ACLs and OSPF configuration, which express the host portion directly instead of the network portion.