IPv4 subnet calculator
Type an address with a prefix (10.20.30.40/22) or a netmask (10.20.30.40 255.255.252.0). Results update as you type, and you can split the network into smaller subnets.
Type an address with a prefix (10.20.30.40/22) or a netmask (10.20.30.40 255.255.252.0). Results update as you type, and you can split the network into smaller subnets.
An IPv4 address is 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network; the rest identify hosts inside it. In 192.168.10.37/24 the first 24 bits are the network (192.168.10.0) and the last 8 bits leave room for 256 addresses.
The first address in a block is the network address and the last is the broadcast address, so a normal subnet has 2(32 − prefix) − 2 usable host addresses. Two exceptions: a /31 has two usable addresses for point-to-point links (RFC 3021), and a /32 is a single host.
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
A wildcard mask is the netmask with every bit flipped (255.255.255.0 becomes 0.0.0.255). Cisco access lists and OSPF network statements use wildcard masks instead of netmasks.
Last reviewed December 2, 2026. Built and maintained by NetKit. Live tests run on third-party services (Globalping, Cloudflare and Google DNS, ipify, ipwho.is, rdap.org) and reflect the moment you run them. Only test systems you own or are allowed to check. Spotted an error? Tell us and we will fix it.