Complete Subnet Mask Cheat Sheet for Beginners 2025 Update

Written By: Nathan Kellert

Posted On:

If you’re learning about networking or trying to pass a certification like CompTIA or Cisco, understanding subnet masks is a must. They can seem confusing at first, but once you break it down, it starts to make a lot more sense.

This guide is your go-to subnet mask cheat sheet with simple explanations and a quick reference table to help you understand how IP addresses and subnets work together.

What Is a Subnet Mask?

A subnet mask is a 32-bit number that works with an IP address to divide a network into smaller parts called subnets. It tells your computer which part of the IP address refers to the network and which part refers to the host (a device like a PC, printer, or router).

For example:

  • IP address: 192.168.1.10
  • Subnet mask: 255.255.255.0

That means the first three parts (192.168.1) are for the network, and the last part (.10) is the host.

Why Subnetting Matters

Subnetting helps you:

  • Improve network performance
  • Organize large networks
  • Control traffic
  • Increase security
  • Avoid wasting IP addresses

It’s used everywhere in networking, from home Wi-Fi routers to huge enterprise systems.

Subnet Mask Basics

Here’s what you should know:

  • A Class A network starts with 1–126 and has a default mask of 255.0.0.0
  • A Class B network starts with 128–191 and has a default mask of 255.255.0.0
  • A Class C network starts with 192–223 and has a default mask of 255.255.255.0

Now let’s look at a full cheat sheet.

Subnet Mask Cheat Sheet

CIDRSubnet Mask# of Hosts# of SubnetsHost IP Range
/8255.0.0.016,777,21411.0.0.1 – 126.255.255.254
/16255.255.0.065,5342561.0.0.1 – 1.0.255.254
/24255.255.255.025465,536192.168.1.1 – 192.168.1.254
/25255.255.255.128126131,072192.168.1.1 – 192.168.1.126
/26255.255.255.19262262,144192.168.1.1 – 192.168.1.62
/27255.255.255.22430524,288192.168.1.1 – 192.168.1.30
/28255.255.255.240141,048,576192.168.1.1 – 192.168.1.14
/29255.255.255.24862,097,152192.168.1.1 – 192.168.1.6
/30255.255.255.25224,194,304192.168.1.1 – 192.168.1.2

Note: The number of hosts = total usable IP addresses (excluding network and broadcast addresses)

What Does CIDR Mean?

CIDR stands for Classless Inter-Domain Routing. Instead of writing a subnet mask like 255.255.255.0, you can write it as /24. The number after the slash is the number of bits used for the network portion.

So:

  • /24 means 24 bits for the network and 8 bits for the host
  • /26 means 26 bits for the network and 6 bits for the host

The smaller the host bits, the fewer devices can fit in that subnet.

How to Choose the Right Subnet

Here’s a quick way to figure out what subnet you need:

  • For 2 devices → use /30
  • For 14 devices → use /28
  • For 50 devices → use /26
  • For 200 devices → use /24
  • For 500+ devices → go with /23 or bigger

Always leave some room for growth. If your office has 45 computers now, pick a subnet that supports at least 60.

Tools That Help

If math isn’t your thing (same), use online tools like:

  • Subnet calculators
  • IP address planners
  • CIDR chart generators

They help avoid mistakes and make subnetting way faster.

Final Thoughts

Subnet masks might seem scary at first, but once you understand the pattern, it becomes easier to plan networks and troubleshoot issues. Use this cheat sheet whenever you’re working with IPs, routers, or trying to pass a networking exam.

Want a printable version of this subnet mask cheat sheet? Just ask and I can make one for you.

Photo of author

Nathan Kellert

Nathan Kellert is a skilled coder with a passion for solving complex computer coding and technical issues. He leverages his expertise to create innovative solutions and troubleshoot challenges efficiently.

Leave a Comment