How to use it
- Enter an address with CIDR prefix (192.168.1.10/24) or mask (10.0.0.1 255.255.240.0), or an IPv6 address.
- Use the prefix buttons to try other sizes quickly.
- Read the results table.
- Optionally split the network into smaller subnets.
What the calculator shows
For IPv4, you get:
- Network address and prefix, e.g.
192.168.1.0/24 - Subnet mask (
255.255.255.0) and wildcard mask (0.0.0.255, used in Cisco ACLs and OSPF) - Broadcast address (
192.168.1.255) - First and last usable host (
192.168.1.1–192.168.1.254) - Usable hosts and total addresses
- Address type (private, public, loopback, CGNAT and so on) and the legacy class
- the address and mask in binary, which makes the network/host split visible
- the previous and next subnet of the same size
For IPv6, you get the compressed and expanded forms, network, first and last address, number of addresses and how many /64 subnets fit. Everything is calculated in your browser.
CIDR prefix cheat sheet
| Prefix | Subnet mask | Total 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 |
| /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 (point-to-point, RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 (single host) |
The rule: total addresses = 2^(32 − prefix). Subtract 2 for the network and broadcast address to get usable hosts, except for /31 and /32.
Worked example
Take 192.168.1.10/24:
- The prefix
/24means the first 24 bits are the network part, giving the mask255.255.255.0. - Network address: the IP AND the mask →
192.168.1.0. - The remaining 8 bits are for hosts: 2^8 = 256 addresses.
- Broadcast: all host bits set to 1 →
192.168.1.255. - Usable hosts:
192.168.1.1to192.168.1.254, which is 254 hosts.
Now 10.0.0.1 255.255.240.0: the mask equals /20, so the network is 10.0.0.0/20 with 4,096 addresses, usable hosts 10.0.0.1 to 10.0.15.254, and broadcast 10.0.15.255.
Splitting a network into subnets
Choose a longer prefix under Split into smaller subnets and the calculator lists every resulting subnet with its host range and broadcast address. For example, 192.168.1.0/24 split into /26 gives four subnets of 62 hosts each:
| Subnet | Hosts | Broadcast |
|---|---|---|
| 192.168.1.0/26 | .1 – .62 | .63 |
| 192.168.1.64/26 | .65 – .126 | .127 |
| 192.168.1.128/26 | .129 – .190 | .191 |
| 192.168.1.192/26 | .193 – .254 | .255 |
This is the everyday task when you plan VLANs for an office, carve a cloud VPC into public and private subnets, or set up a home lab. Note that cloud providers reserve some addresses in each subnet; AWS, for example, reserves five, so a /24 subnet there has 251 usable addresses.
Private and special address ranges
| Range | Purpose |
|---|---|
| 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | Private networks (RFC 1918), not routed on the internet |
| 100.64.0.0/10 | Carrier-grade NAT (RFC 6598), used by ISPs |
| 127.0.0.0/8 | Loopback (localhost) |
| 169.254.0.0/16 | Link-local; an address here usually means DHCP failed |
| 224.0.0.0/4 | Multicast |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Reserved for documentation and examples |
For IPv6, fe80::/10 is link-local, fc00::/7 is unique local (the private-network equivalent), 2001:db8::/32 is for documentation, and 2000::/3 is global unicast. A standard IPv6 LAN is a /64.
Frequently asked questions
How many hosts are in a /24?
256 addresses, of which 254 are usable hosts: the network address and the broadcast address cannot be assigned.
How do I convert a subnet mask to CIDR?
Count the 1 bits in the mask. 255.255.255.0 has 24, so it is /24. You can also type the mask after the IP and the calculator converts it.
What is a wildcard mask?
The inverse of the subnet mask, such as 0.0.0.255 for /24. Cisco access lists and OSPF use it.
Why does /31 have 2 usable addresses?
RFC 3021 allows /31 on point-to-point links, where no network or broadcast address is needed.
Does it support IPv6?
Yes. Enter an IPv6 address with a prefix, such as 2001:db8::1/48, to get the range and number of addresses and /64 subnets.
Last updated: November 12, 2026