IPv4 Subnet Calculator
Calculate the subnet mask, wildcard mask, network and broadcast addresses, and the usable host range from an IP and a CIDR prefix.
This tool runs entirely in your browser. Anything you type here is never sent to a server.
- IP address
- —
- CIDR
- —
- Subnet mask
- —
- Wildcard mask
- —
- Network address
- —
- Broadcast address
- —
- First usable host
- —
- Last usable host
- —
- Total addresses
- —
- Usable hosts
- —
How IPv4 subnet calculation works
An IPv4 subnet is defined by an IP address and a CIDR prefix (e.g. /24), which tells you how many of the 32 total bits are reserved to identify the network. The remaining bits identify the hosts within that network. From those two values you can derive the subnet mask, the network address, the broadcast address and the range of addresses usable by devices.
Example
For 192.168.1.10/24, the subnet mask is 255.255.255.0, the network is 192.168.1.0, the broadcast is 192.168.1.255 and the usable host range runs from 192.168.1.1 to 192.168.1.254 (254 usable addresses).
Frequently asked questions
What about /31 and /32?
A /32 identifies a single address (a host or a specific route), with no separate network or broadcast address. A /31, per RFC 3021, is commonly used on point-to-point links: both of its addresses are usable as hosts, with no dedicated broadcast address.
Why do the other prefixes subtract 2 addresses?
Because the first address in the range identifies the network and the last one is reserved for broadcast; neither can be assigned to a host.