IPv4

Subnetting Cheat Sheet — CIDR, Subnet Mask and Host Count Chart

G Gurpreet Singh • August 28, 2026 • 4 min read
A reference table of CIDR prefixes from slash 24 to slash 30 with subnet mask, block size, usable hosts and typical use, with the point-to-point slash 30 row highlighted
📖 4 min read · 813 words

Everything you need on one page: CIDR prefix, subnet mask, block size, usable hosts and wildcard mask. If you are learning the method rather than looking up a value, start with subnetting explained.

The Four Things Worth Memorising

MemoriseValue
Bit values in an octet128, 64, 32, 16, 8, 4, 2, 1
Valid mask octets0, 128, 192, 224, 240, 248, 252, 254, 255
Block size (magic number)256 minus mask octet
Usable hosts2host bits minus 2

A mask octet that is not in that second row is invalid. Mask bits are contiguous from the left, so 100, 200 and 255.255.255.100 can never be correct.

Full CIDR Chart, /8 to /32

CIDRSubnet maskWildcard maskBlock sizeTotal addressesUsable hosts
/8255.0.0.00.255.255.255—16,777,21616,777,214
/9255.128.0.00.127.255.255128 (2nd)8,388,6088,388,606
/10255.192.0.00.63.255.25564 (2nd)4,194,3044,194,302
/11255.224.0.00.31.255.25532 (2nd)2,097,1522,097,150
/12255.240.0.00.15.255.25516 (2nd)1,048,5761,048,574
/13255.248.0.00.7.255.2558 (2nd)524,288524,286
/14255.252.0.00.3.255.2554 (2nd)262,144262,142
/15255.254.0.00.1.255.2552 (2nd)131,072131,070
/16255.255.0.00.0.255.255—65,53665,534
/17255.255.128.00.0.127.255128 (3rd)32,76832,766
/18255.255.192.00.0.63.25564 (3rd)16,38416,382
/19255.255.224.00.0.31.25532 (3rd)8,1928,190
/20255.255.240.00.0.15.25516 (3rd)4,0964,094
/21255.255.248.00.0.7.2558 (3rd)2,0482,046
/22255.255.252.00.0.3.2554 (3rd)1,0241,022
/23255.255.254.00.0.1.2552 (3rd)512510
/24255.255.255.00.0.0.255—256254
/25255.255.255.1280.0.0.127128128126
/26255.255.255.1920.0.0.63646462
/27255.255.255.2240.0.0.31323230
/28255.255.255.2400.0.0.15161614
/29255.255.255.2480.0.0.7886
/30255.255.255.2520.0.0.3442
/31255.255.255.2540.0.0.1222 (RFC 3021)
/32255.255.255.2550.0.0.0111

Bolded rows are the ones that appear most often in exams and in real designs.

Binary Reference

DecimalBinaryBits set
0000000000
128100000001
192110000002
224111000003
240111100004
248111110005
252111111006
254111111107
255111111118

Converting a full address is covered in decimal to binary conversion.

Wildcard Masks

A wildcard mask is the inverse of a subnet mask, subtract each octet from 255. Used by ACLs and OSPF network statements, where 0 means “must match” and 1 means “ignore”.

Subnet mask:   255.255.255.192
               255-255 . 255-255 . 255-255 . 255-192
Wildcard:        0     .   0     .   0     .   63

access-list 101 permit ip 192.168.1.0 0.0.0.63 any
router ospf 1
 network 192.168.1.0 0.0.0.63 area 0

Private Address Ranges

RangeCIDRAddressesTypically used by
10.0.0.0 to 10.255.255.25510.0.0.0/816,777,216Enterprises, cloud VPCs
172.16.0.0 to 172.31.255.255172.16.0.0/121,048,576Medium networks, Docker
192.168.0.0 to 192.168.255.255192.168.0.0/1665,536Home and small office

The 172 range is 172.16 to 172.31 only, not all of 172. Full detail in IPv4 addressing.

Special Addresses

RangeMeaning
127.0.0.0/8Loopback
169.254.0.0/16APIPA, DHCP failed
100.64.0.0/10Carrier-grade NAT
224.0.0.0/4Multicast
255.255.255.255Limited broadcast
0.0.0.0/0Default route

Fast Lookup, Hosts Needed to Prefix

You needUseYou get
1 to 2 hosts/302
3 to 6/296
7 to 14/2814
15 to 30/2730
31 to 62/2662
63 to 126/25126
127 to 254/24254
255 to 510/23510
511 to 1022/221,022

Round up, always. Needing 65 hosts means a /25, not a /26.

Finding a Subnet in Three Steps

Given: 192.168.5.100/27

1. Block size  = 256 - 224 = 32
2. Blocks      = 0, 32, 64, 96, 128, 160, 192, 224
   100 falls in the 96 block
3. Network     = 192.168.5.96
   Broadcast   = 96 + 32 - 1 = 192.168.5.127
   Usable      = 192.168.5.97 - 192.168.5.126

Check any answer instantly with the subnet calculator, then test yourself against the practice questions. For unequal subnet sizes in one network, see VLSM.

Frequently Asked Questions

What is the block size in subnetting?

256 minus the interesting mask octet. It is the increment between consecutive subnet addresses, for a /28 (mask 240) the block size is 16, so subnets start at 0, 16, 32, 48 and so on.

How do I convert a subnet mask to CIDR?

Count the 1 bits. 255.255.255.192 is 8 + 8 + 8 + 2 = /26. The bits-set column in the binary table above gives the count for each octet value.

What is a wildcard mask used for?

ACLs and OSPF network statements. It is the inverse of the subnet mask, subtract each octet from 255. A /26 mask of 255.255.255.192 becomes wildcard 0.0.0.63. Our CIDR to subnet mask converter works both values out for any prefix.

Why does a /30 give only 2 usable hosts?

It has 4 total addresses, and two are always consumed by the network and broadcast addresses. That leaves exactly 2, which is why /30 is the standard for point-to-point WAN links.

Can I use a /31?

Yes, on point-to-point links. RFC 3021 removes the network and broadcast addresses for that case, giving 2 usable addresses from 2 total. Most modern router platforms support it.

What is the largest private network I can build?

10.0.0.0/8 gives 16,777,214 usable addresses, the largest of the three RFC 1918 ranges.

Where this shows up in real life

Subnetting Cheat Sheet — CIDR, Subnet Mask and Host Count Chart sounds abstract until you meet it in a normal setup. Take the sections above on The Four Things Worth Memorising and Full CIDR Chart, /8 to /32: every one of them maps to a device or a setting you can point at. Once you can point at it, the idea stops being theory.

The test is simple. Can you explain it to someone in two sentences, using your own network as the example? If yes, you understand it. If not, re-read the part where you got stuck, not the whole article.

The parts people mix up

  • Names that sound alike. Networking is full of terms that differ by one word and mean different things. When two ideas blur together, write both definitions side by side. The difference is usually one sentence.
  • What it does versus what it is called. Product names and protocol names get used loosely. Trust the function, not the label.
  • Old rules that no longer apply. Advice from ten years ago still circulates. Check whether it matches current hardware before you follow it.

When does this actually matter?

Not every day. Subnetting Cheat Sheet — CIDR, Subnet Mask and Host Count Chart matters on three occasions: when something breaks, when you buy equipment, and when you plan a change. Knowing it before those moments is what turns a two-hour problem into a ten-minute fix.

What to learn next

Pick the topic that connects directly to this one, not a random next article. Knowledge in networking compounds: each idea makes the next one easier, but only if the two are actually connected. The related articles at the end of this page are the right place to look.

🧠 Quick Check — Test Yourself

Can you explain this topic to someone else in 30 seconds? If not, re-read the key takeaways above.

What should you remember most?

The core concepts in the takeaways box above. Bookmark this page and come back when you need a refresher.

GU
Written by

Gurpreet Singh

Hey! I"m Gurpreet Singh and I Have 7+ Years of experience in the Network & Security Domain as well as the Cloud Infra Domain. I am Certified with Cisco ( CCNA ), CheckPoint ( CCSA ), 1xAWS, 3xAZURE, and 3xNSE. So I love to share my tech knowledge with you.

Leave a Reply

Your email address will not be published. Required fields are marked *