Enter an IPv4 address with a CIDR prefix or subnet mask to see the network and broadcast addresses, the first and last usable hosts, and how many hosts the subnet can hold.
Loading the tool…
How it works
- The mask is the prefix length expressed as 32 bits: /24 means the first 24 bits are the network.
- Network address = address AND mask. Broadcast = network OR wildcard (the inverted mask).
- Usable hosts = 2^(32 − prefix) − 2, because the network and broadcast addresses are not assignable on normal subnets.
Assumptions and limits
- IPv4 only. For IPv6 use the IPv6 Subnet Calculator.
- /31 networks are treated as point-to-point links (RFC 3021) with two usable addresses, and /32 as a single host.
- Special-use ranges (private, loopback, link-local and so on) are labelled from published IANA allocations.
Frequently asked questions
What does /24 mean?
The first 24 of the 32 address bits identify the network, leaving 8 bits (256 addresses) for hosts.
Why are two addresses unusable?
The first address identifies the network and the last is the broadcast address, so neither can be assigned to a normal host.