An IPv4 address is 32 bits long. A CIDR prefix /n leaves 32 − n host bits. That gives 2^(32−n) total addresses and 2^(32−n) − 2 usable host addresses on ordinary subnets from /8 through /30. For quick checks on any IPv4 or IPv6 block, use the free Subnet Calculator on Monity (monity.ai), which calculates the subnet, address range and count in your browser.
IPv4 subnet mask table (/8 to /32)
Every row below is computed from 32-bit network arithmetic. The wildcard mask is the bitwise inverse of the subnet mask (255.255.255.255 minus the mask). Routers use wildcard masks in access control lists and OSPF network statements.
| CIDR | Subnet mask | Wildcard mask | Total addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 |
0.255.255.255 |
16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 |
0.127.255.255 |
8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 |
0.63.255.255 |
4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 |
0.31.255.255 |
2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 |
0.15.255.255 |
1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 |
0.7.255.255 |
524,288 | 524,286 |
| /14 | 255.252.0.0 |
0.3.255.255 |
262,144 | 262,142 |
| /15 | 255.254.0.0 |
0.1.255.255 |
131,072 | 131,070 |
| /16 | 255.255.0.0 |
0.0.255.255 |
65,536 | 65,534 |
| /17 | 255.255.128.0 |
0.0.127.255 |
32,768 | 32,766 |
| /18 | 255.255.192.0 |
0.0.63.255 |
16,384 | 16,382 |
| /19 | 255.255.224.0 |
0.0.31.255 |
8,192 | 8,190 |
| /20 | 255.255.240.0 |
0.0.15.255 |
4,096 | 4,094 |
| /21 | 255.255.248.0 |
0.0.7.255 |
2,048 | 2,046 |
| /22 | 255.255.252.0 |
0.0.3.255 |
1,024 | 1,022 |
| /23 | 255.255.254.0 |
0.0.1.255 |
512 | 510 |
| /24 | 255.255.255.0 |
0.0.0.255 |
256 | 254 |
| /25 | 255.255.255.128 |
0.0.0.127 |
128 | 126 |
| /26 | 255.255.255.192 |
0.0.0.63 |
64 | 62 |
| /27 | 255.255.255.224 |
0.0.0.31 |
32 | 30 |
| /28 | 255.255.255.240 |
0.0.0.15 |
16 | 14 |
| /29 | 255.255.255.248 |
0.0.0.7 |
8 | 6 |
| /30 | 255.255.255.252 |
0.0.0.3 |
4 | 2 |
| /31 | 255.255.255.254 |
0.0.0.1 |
2 | 2* (RFC 3021) |
| /32 | 255.255.255.255 |
0.0.0.0 |
1 | 1 (host route) |
*On standard broadcast subnets, a /31 leaves zero usable host addresses. Under RFC 3021, routers may use a 31-bit prefix on a point-to-point link so both addresses are usable.
How to read CIDR, masks and host counts
In CIDR notation, the number after the slash counts the leading 1 bits in the 32-bit mask. The remaining bits identify hosts inside that subnet.
- Network and broadcast addresses: On subnets from
/8to/30, two addresses are reserved. The lowest address (all host bits0) is the network address. The highest address (all host bits1) is the broadcast address. Subtract 2 from total addresses to get usable hosts. - Worked example (
192.168.10.0/26): A/26leaves 6 host bits, or2^6 = 64total addresses. The subnet mask is255.255.255.192, and the wildcard mask is0.0.0.63. The network address is192.168.10.0, the 62 usable hosts run from192.168.10.1to192.168.10.62, and the broadcast address is192.168.10.63. - Single-host routes (
/32): All 32 bits are fixed. Use/32for a single IPv4 host in a firewall rule, loopback interface or static route.
Private IPv4 address ranges (RFC 1918)
RFC 1918, Section 3 reserves three IPv4 blocks through IANA for private internets. Any organization can use them internally without coordinating with an Internet registry. Private addresses cannot route directly over the public Internet without translation.
| CIDR block | Address range | RFC 1918 name | Total addresses | Pre-CIDR equivalent |
|---|---|---|---|---|
10.0.0.0/8 |
10.0.0.0 – 10.255.255.255 |
24-bit block | 16,777,216 | 1 Class A network |
172.16.0.0/12 |
172.16.0.0 – 172.31.255.255 |
20-bit block | 1,048,576 | 16 contiguous Class B networks |
192.168.0.0/16 |
192.168.0.0 – 192.168.255.255 |
16-bit block | 65,536 | 256 contiguous Class C networks |
IPv6 prefixes: /48, /56 and /64
IPv6 addresses are 128 bits long. RFC 4291 (Sections 2.5.1 and 2.5.4) splits Global Unicast addresses into an n-bit global routing prefix, an m-bit subnet ID, and a 64-bit interface ID (n + m = 64). That 64-bit interface ID requirement applies to all unicast addresses except those starting with binary 000. As a result, a standard IPv6 link subnet is a /64.
End-site allocations sit above that /64 boundary. RFC 6177 (BCP 157) obsoleted RFC 3177’s single default /48 recommendation. It notes that APNIC, ARIN and RIPE revised policies to encourage smaller /56 blocks for end sites while avoiding hard-coded prefix boundaries.
| IPv6 prefix | Subnet ID bits | Number of /64 subnets | Common role |
|---|---|---|---|
/48 |
16 bits | 65,536 | Larger sites or enterprise allocations |
/56 |
8 bits | 256 | Smaller end sites and branch allocations (RFC 6177) |
/64 |
0 bits | 1 (2^64 interface addresses) | Standard single LAN or link subnet (RFC 4291) |
Verify subnets and monitor public hosts
Use Monity’s free Subnet Calculator to check any IPv4 CIDR mask or IPv6 block without doing binary math by hand. Once hosts on a public subnet are live, test them with Monity’s free Ping Check (ICMP ping from Monity’s network) and Port Checker (TCP port check).
For scheduled checks on public websites, APIs, TCP ports or DNS records, Monity’s uptime monitoring runs every 5 minutes on the Free plan ($0/month, 3 monitors, 100 credits a month). Paid plans check every minute or every 30 seconds by plan, and 1,000 uptime checks use 1 credit. Failed checks are re-checked 3 and 6 seconds later before alerting over email, Slack, Microsoft Teams, Discord, Telegram, Google Sheets, signed webhooks or phone push.

Watching the services on your subnets
Monity’s uptime checks run from Monity’s servers on the public Internet, so they watch your public-facing services, TCP ports and DNS. Private RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16) don’t route across the public Internet, so watch internal subnets from inside your own network. Monity’s checks don’t ping (ICMP) or run traceroutes.