NetworkAI
  • MonitoringCertificate & Domain MonitorDaily checks of TLS certificates, domain registration and DNS, with alerts when a renewal fails.
  • AssessmentSecurity AssessmentA passive security report for a domain you own: TLS, DNS, email authentication, headers and registration.
Free tools
Start hereDomain Health CheckSSL, DNS, email authentication, security headers and expiry in one scored report.Run a health check →
Domain
  • Bulk Domain Expiry Checker
  • RDAP Domain Lookup
  • WHOIS Lookup
SSL / TLS
  • SSL Certificate Checker
  • Bulk SSL Expiry Checker
  • 47-Day Certificate Lifetime Calculator
  • Certificate Lifetime Readiness
  • Post-Quantum TLS Checker
DNS
  • DNS Lookup
  • MX Lookup
  • CAA Record Checker
  • DNS Propagation Checker
  • TXT Record Lookup
  • NS Lookup
  • CNAME Lookup
  • Reverse DNS Lookup
Email authentication
  • SPF Record Checker
  • SPF Record Generator
  • DMARC Record Checker
  • DMARC Record Generator
  • DKIM Record Checker
  • Email Sender Requirements Checker
Website security
  • Security Headers Checker
Network & IP
  • What Is My IP Address
  • Subnet Calculator
All free tools →
PricingDocsGuides
Log inStart free
  • MonitoringCertificate & Domain MonitorDaily checks of TLS certificates, domain registration and DNS, with alerts when a renewal fails.
  • AssessmentSecurity AssessmentA passive security report for a domain you own: TLS, DNS, email authentication, headers and registration.
Free tools
Start hereDomain Health Check
Domain
  • Bulk Domain Expiry Checker
  • RDAP Domain Lookup
  • WHOIS Lookup
SSL / TLS
  • SSL Certificate Checker
  • Bulk SSL Expiry Checker
  • 47-Day Certificate Lifetime Calculator
  • Certificate Lifetime Readiness
  • Post-Quantum TLS Checker
DNS
  • DNS Lookup
  • MX Lookup
  • CAA Record Checker
  • DNS Propagation Checker
  • TXT Record Lookup
  • NS Lookup
  • CNAME Lookup
  • Reverse DNS Lookup
Email authentication
  • SPF Record Checker
  • SPF Record Generator
  • DMARC Record Checker
  • DMARC Record Generator
  • DKIM Record Checker
  • Email Sender Requirements Checker
Website security
  • Security Headers Checker
Network & IP
  • What Is My IP Address
  • Subnet Calculator
All free tools →
PricingDocsGuides
Start freeLog in
ON THIS PAGESubnet masks and CIDR in one minuteCIDR chart: /0 to /32The eight mask values to memorizeSubnetting by hand: the block-size methodSplitting a /24 into smaller subnetsWhere each size is usedPrivate and reserved IPv4 rangesIP address classes (and why they no longer matter)A note on IPv6FAQ
Home / Guides
GUIDE · 8 MIN READ · UPDATED NOV 2026

Subnet mask cheat sheet: every CIDR prefix, mask and host count

One page to keep open while you plan a network or study for an exam: the full CIDR chart, the eight mask values worth memorizing, the block-size shortcut for subnetting by hand, and the address ranges that are reserved.

Subnet masks and CIDR in one minute

An IPv4 address is 32 bits, written as four numbers from 0 to 255 (octets). A subnet mask marks which of those bits name the network and which name a host inside it: every 1 bit in the mask is network, every 0 bit is host. 255.255.255.0 is 24 ones followed by 8 zeros, so the first three octets are the network and the last one is the host.

CIDR notation (Classless Inter-Domain Routing) writes the same thing as a slash and the number of 1 bits: 192.168.1.0/24 means the mask 255.255.255.0. The prefix length is the only number you need; the mask, the wildcard mask and the host count all follow from it. CIDR is defined in RFC 4632, and the original subnetting procedure in RFC 950.

Every subnet has a network address (all host bits 0) and a broadcast address (all host bits 1). Neither can be given to a device, which is why a subnet with 256 addresses has 254 usable hosts.

CIDR chart: /0 to /32

Usable hosts are the total addresses minus 2 (network and broadcast), except /31 and /32. The wildcard mask is the mask inverted (255 minus each octet); Cisco ACLs and OSPF use it instead of the subnet mask.

PrefixSubnet maskWildcard maskAddressesUsable hosts
/00.0.0.0255.255.255.2554,294,967,296n/a (default route)
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 (point-to-point links, RFC 3021)
/32255.255.255.2550.0.0.011 (a single host)

The eight mask values to memorize

A mask octet can only take nine values: 0 and the eight below. Each adds one more 1 bit from the left. The block size is 256 minus the value, and it is the step between one subnet and the next in that octet.

Mask octetBinaryBlock sizePrefix in 4th / 3rd / 2nd octet
12810000000128/25 · /17 · /9
1921100000064/26 · /18 · /10
2241110000032/27 · /19 · /11
2401111000016/28 · /20 · /12
248111110008/29 · /21 · /13
252111111004/30 · /22 · /14
254111111102/31 · /23 · /15
255111111111/32 · /24 · /16

If you remember the powers of two (2, 4, 8, 16, 32, 64, 128, 256), you can rebuild this table in your head: a /24 has 2^8 = 256 addresses, and each extra prefix bit halves the subnet.

Subnetting by hand: the block-size method

To find the network, broadcast and host range for any address and prefix:

  1. Find the interesting octet: the one where the mask is neither 255 nor 0.
  2. Work out the block size: 256 minus the mask value in that octet.
  3. List multiples of the block size (0, block, 2 × block …) and find the one at or just below the address's value in that octet. That is the network address.
  4. The next multiple minus 1 is the broadcast address. Everything between them is the usable host range.

Example 1: 192.168.10.77/27. The mask is 255.255.255.224, so the interesting octet is the fourth and the block size is 256 − 224 = 32. The subnets start at 0, 32, 64, 96 …; 77 falls between 64 and 95.

FieldValue
Network address192.168.10.64
First usable host192.168.10.65
Last usable host192.168.10.94
Broadcast address192.168.10.95
Usable hosts30

Example 2: 10.20.37.5/20. The mask is 255.255.240.0, so the interesting octet is the third and the block size is 16. The subnets start at 0, 16, 32, 48 …; 37 falls between 32 and 47. The network is 10.20.32.0, the broadcast is 10.20.47.255, and hosts run from 10.20.32.1 to 10.20.47.254 (4,094 usable).

To check your work, or to skip the arithmetic, paste the address into the subnet calculator. It shows the network, broadcast, mask, wildcard and host range for any IPv4 CIDR block.

Splitting a /24 into smaller subnets

Each bit you borrow from the host part doubles the number of subnets and halves their size. Starting from one /24 (256 addresses):

New prefixSubnetsAddresses eachUsable hosts eachSubnets start at (4th octet)
/2521281260, 128
/26464620, 64, 128, 192
/27832300, 32, 64 … 224
/281616140, 16, 32 … 240
/2932860, 8, 16 … 248
/3064420, 4, 8 … 252

To size a subnet, take the number of hosts you need, add 2, and round up to the next power of two. 50 devices need 52 addresses, so a /26 (64) fits; 100 devices need a /25. Leave room to grow, because renumbering a subnet later is much harder than starting one size larger.

Where each size is used

PrefixTypical use
/32One address: a host route, a loopback interface, or a single IP in a firewall rule
/31A link between two routers, with no network or broadcast address wasted (RFC 3021)
/30The older way to number a point-to-point link: 2 usable addresses
/29A small block of public IPs from an ISP: 6 usable, one of which is usually the gateway
/24The usual office or home LAN, such as 192.168.1.0/24
/22 – /20Larger LANs, campus VLANs and Wi-Fi networks with many clients
/16A whole site or a cloud virtual network, split into smaller subnets inside

RFC 3021 allows a /31 on point-to-point links because there are only two ends, so neither address needs to be the network or broadcast. Most current router operating systems support it.

Private and reserved IPv4 ranges

RangeCIDRWhat it is
10.0.0.0 – 10.255.255.25510.0.0.0/8Private (RFC 1918)
172.16.0.0 – 172.31.255.255172.16.0.0/12Private (RFC 1918)
192.168.0.0 – 192.168.255.255192.168.0.0/16Private (RFC 1918)
100.64.0.0 – 100.127.255.255100.64.0.0/10Shared address space for carrier-grade NAT (RFC 6598)
127.0.0.0 – 127.255.255.255127.0.0.0/8Loopback: traffic never leaves the host
169.254.0.0 – 169.254.255.255169.254.0.0/16Link-local: self-assigned when DHCP fails

The three private blocks in RFC 1918 are not routed on the public internet, so any network can reuse them behind NAT. RFC 6598 set aside 100.64.0.0/10 for ISPs that run carrier-grade NAT; if your router's WAN address is in that range, you do not have a public IP of your own. The What is my IP tool shows the public address the internet actually sees.

IP address classes (and why they no longer matter)

Before CIDR, the first bits of an address fixed its network size. You will still meet these classes in exam questions and old documentation:

ClassFirst octetDefault maskPurpose
A1 – 126255.0.0.0 (/8)Large networks (127 is reserved for loopback)
B128 – 191255.255.0.0 (/16)Medium networks
C192 – 223255.255.255.0 (/24)Small networks
D224 – 239NoneMulticast
E240 – 255NoneReserved, experimental

CIDR replaced this scheme in 1993 because fixed /8, /16 and /24 blocks wasted addresses and bloated routing tables. Today any prefix length can be used anywhere, so 10.1.2.0/24 and 192.168.0.0/22 are both perfectly normal.

A note on IPv6

IPv6 has no subnet masks in dotted form, only prefix lengths, and the sizes work differently: a normal LAN is a /64, and a site is commonly given a /48 or /56 to split into /64s. There is no broadcast address in IPv6, so nothing is subtracted from the host count. The cheat sheet above is for IPv4 only.

NetworkAI is built by a network security engineer for the people who run networks. Alongside free tools like the subnet calculator, it checks your certificates and domain registrations every day and alerts you when a renewal fails.

Frequently asked questions

How do I check a subnet range?

+

Take the block size (256 minus the mask value in the octet that is not 255 or 0), find the multiple of it at or below your address, and that is the network address; the next multiple minus 1 is the broadcast. A subnet calculator does the same instantly for any CIDR block.

What are the 5 classes of IP addresses?

+

Class A (first octet 1–126, default /8), class B (128–191, /16), class C (192–223, /24), class D (224–239, multicast) and class E (240–255, reserved). Classes have been obsolete for routing since CIDR in 1993, but they still appear in exams and old documentation.

What is a subnet mask, in simple terms?

+

A subnet mask tells a device which part of an IP address is the network and which part is the device itself. With 255.255.255.0, addresses that share the first three numbers are on the same local network and are reached directly; anything else goes through the router.

What does a subnet mask of 255.255.255.255 do?

+

255.255.255.255 is a /32: all 32 bits are network bits, so the subnet holds exactly one address. It is used for host routes, loopback interfaces, VPN tunnel endpoints and firewall rules that match a single IP.

What happens if I use the wrong subnet mask?

+

If the mask is too small, the device thinks some local addresses are remote and sends that traffic to the router, which can fail or slow things down. If it is too large, the device tries to reach remote addresses directly on the LAN and cannot. Either way, some hosts become unreachable.

How many usable hosts are in a /24, /27 or /30?

+

A /24 has 254 usable hosts, a /27 has 30 and a /30 has 2. The rule is 2 to the power of (32 minus the prefix), minus 2 for the network and broadcast addresses. /31 and /32 are exceptions with 2 and 1 usable addresses.

What is the difference between a subnet mask and a wildcard mask?

+

A wildcard mask is the subnet mask inverted: 255 minus each octet, so 255.255.255.0 becomes 0.0.0.255. Subnet masks configure interfaces; wildcard masks are used in Cisco access lists and OSPF to say which bits of an address to ignore.

Sources

  1. RFC 4632: Classless Inter-domain Routing (CIDR)
  2. RFC 950: Internet Standard Subnetting Procedure
  3. RFC 1918: Address Allocation for Private Internets
  4. RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
  5. RFC 6598: IANA-Reserved IPv4 Prefix for Shared Address Space

Free tools for this

  • Subnet calculator
  • What is my IP
  • Reverse DNS lookup

More guides

  • SSL Handshake Failed: What It Means and How to Fix It
  • Unable to Get Local Issuer Certificate: Causes and Fixes
  • What Is DKIM? How DKIM Records Work and How to Set One Up
  • Domain Expired? What Happens Next: Grace & Redemption
  • Your Connection Is Not Private: How Site Owners Fix It
  • How to Renew an SSL Certificate (and Catch Failed Renewals)
Skip the arithmeticThe free subnet calculator gives network, broadcast, mask, wildcard and host range for any IPv4 block.Open the subnet calculator
NetworkAI

Renewal-failure alerts for TLS certificates and domain registrations.

Product

  • Certificate monitor
  • Pricing
  • Log in
  • Start free

Free tools

  • Domain Health Check
  • SSL Certificate Checker
  • SPF Record Checker
  • DMARC Record Checker
  • Security Headers Checker
  • DNS Lookup
  • All free tools →

Tool categories

  • Domain
  • SSL / TLS
  • DNS
  • Email authentication
  • Website security
  • Network & IP

Resources

  • Documentation
  • Slack & webhook alerts
  • Guides
  • All comparisons
  • NetworkAI vs UptimeRobot
© 2026 NetworkAI · Built by a network security engineer
PrivacyTerms
EspañolالعربيةDeutsch