IPv4 subnet mask reference
Prefix length against mask, wildcard mask and usable host count. Most LAN planning lands on /8, /16, /24, /25 or /26. /31 and /32 are special: the first is a point-to-point link (RFC 3021), the second is a single host.
IPv4 Subnet & CIDR Calculator
Drop in something like 192.168.1.130/26 and you immediately see which block it belongs to, where the broadcast address sits and how many hosts are left. Subnet planning, firewall allow-lists and "why can these two machines on the same switch not reach each other" all start from these numbers.
Dotted masks work too (10.0.0.0/255.255.0.0) and are checked for contiguity: a mask whose bits read 1, then 0, then 1 again will be rejected by routers and operating systems alike.
Features
- Everything in one pass — Network, broadcast, mask, wildcard, usable range, host count and address type in one table.
- Masks both ways — Type a prefix length or a dotted mask; they convert both ways and are validated for contiguity.
- Integer and binary — The address as a decimal integer, in hex and in dotted binary, ready for ACL and bitwise work.
- Mask reference — A /1 to /32 table of mask, wildcard and usable hosts, so you stop guessing.
How to use
- Enter an IP or a block on the left, for example 192.168.1.130/26.
- The result table updates on every keystroke.
- Use the mask reference below to look up any other prefix.
FAQ
Why does a /24 only have 254 usable hosts?
A /24 holds 256 addresses. The first has all host bits zero (network address) and the last has all host bits one (broadcast address); neither can be assigned. That leaves 254. /31 is the exception: RFC 3021 lets both addresses be used on point-to-point links.
What is a wildcard mask for?
It is the subnet mask inverted bit by bit. Cisco ACLs, the OSPF network command and many firewall rules expect it: for a /24 the mask is 255.255.255.0 and the wildcard is 0.0.0.255.
Why classify the address type?
It tells you at a glance whether an address is private, loopback, link-local (169.254.x.x) or carrier-grade NAT. When a service is unreachable, checking which range the address falls into often saves half the debugging.