IPv4 subnet calculator
Enter an IPv4 address and prefix (CIDR) to instantly calculate the network address, broadcast, usable host range, subnet mask, wildcard and host count.
What is a subnet?
A subnet splits a large IP network into smaller, manageable pieces. The CIDR prefix (the /24 in 192.168.1.0/24) says how many leading bits identify the network; the rest identify hosts. A /24 reserves 24 bits for the network, leaving 8 for hosts — 256 addresses, 254 of them usable.
Why the network and broadcast addresses aren't usable
In every IPv4 subnet, the first address identifies the network itself and the last address is the broadcast (reaches all hosts at once). Neither can be assigned to a device, which is why a /24 gives 256 total but only 254 usable hosts.
Common prefix sizes
| CIDR | Subnet mask | Usable hosts |
|---|---|---|
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /24 | 255.255.255.0 | 254 |
| /16 | 255.255.0.0 | 65,534 |
| /8 | 255.0.0.0 | 16,777,214 |
Frequently Asked Questions
What does /24 mean?
The /24 is the prefix length: the first 24 bits are the network portion. That leaves 8 host bits, giving 256 total addresses (254 usable) — the classic home/office LAN size.
How many hosts can a /29 hold?
A /29 has 3 host bits = 8 total addresses, minus the network and broadcast = 6 usable hosts. It's commonly used for small point-to-point links and server blocks.
What's a wildcard mask?
It's the bitwise inverse of the subnet mask (e.g. 0.0.0.255 for a /24). Access-control lists and routing protocols like OSPF use wildcard masks to match address ranges.
Need binary or hex?
Convert IPv4 addresses between dotted-decimal, binary, hexadecimal and integer.
Open IP ⇄ Binary Converter