IPv4 Subnet Calculator
Enter an IP address and a CIDR prefix (or subnet mask) to get the full subnet breakdown: network address, broadcast address, usable host range, wildcard mask and host count.
Source: IPv4 addressing per RFC 791, /31 point-to-point networks per RFC 3021. See the full methodology page. Reviewed: July 2026.
Subnet calculator, CIDR calculator, or subnet mask calculator?
These are three names for the same underlying calculation. A CIDR calculator takes a prefix length like /24; a subnet mask calculator takes the dotted-decimal form like 255.255.255.0; an IP subnet calculator is just the general term for either. This tool accepts CIDR notation directly and shows the equivalent subnet mask in the results, so it works as all three without needing separate tools.
What is a subnet mask?
A subnet mask splits an IPv4 address into a network portion and a host portion. It's usually written either as a dotted-decimal mask (255.255.255.0) or as a CIDR prefix length (/24) — both describe the same thing: how many of the 32 bits in the address identify the network.
How to read the results
The network address identifies the subnet itself and cannot be assigned to a device. The broadcast address is reserved for sending traffic to every host on the subnet. Everything between them is the usable host range — the addresses you can actually assign to servers, switches, or workstations.
Why does a /24 give only 254 usable hosts instead of 256?
A /24 has 256 total addresses, but the first (network) and last (broadcast) are reserved, leaving 254 usable addresses for hosts.
What's the difference between a subnet mask and a wildcard mask?
A wildcard mask is the inverse of the subnet mask, bit-for-bit. It's used in Cisco ACLs and OSPF network statements instead of a standard subnet mask.
Does this work for /31 and /32 networks?
Yes — /31 is handled per RFC 3021 (both addresses usable, point-to-point links), and /32 is treated as a single host route.