How To Calculate Subnet Masks For Class C Networks – ITU Online IT Training

How To Calculate Subnet Masks For Class C Networks

Ready to start learning? Individual Plans →Team Plans →

If you have ever had to split a small network into cleaner segments, subnetting is the skill that turns guesswork into a repeatable process. This guide shows how to calculate Subnetting for Class C networks, how IP Addressing relates to masks and host counts, and how to use Network Planning and Subnet Calculation to pick the right layout for the job.

Featured Product

CompTIA N10-009 Network+ Training Course

Discover essential networking skills and gain confidence in troubleshooting IPv6, DHCP, and switch failures to keep your network running smoothly.

Get this course on Udemy at the lowest price →

Quick Answer

To calculate subnet masks for a Class C network, start with the default /24 mask, borrow host bits to create more subnets, convert the borrowed bits into dotted decimal, and then use the block size to find network, broadcast, and usable host ranges. The most common Class C subnet masks are /25 through /30, and the right choice depends on how many usable hosts you need.

Quick Procedure

  1. Start with the default /24 mask.
  2. Count how many hosts you need per subnet.
  3. Borrow the minimum number of bits that meets that host count.
  4. Convert the borrowed bits into dotted-decimal form.
  5. Calculate the block size using 256 minus the interesting octet.
  6. List each subnet’s network, usable range, and broadcast address.
  7. Verify the result against your device or documentation needs.
Default Class C Mask255.255.255.0 as of June 2026
CIDR Prefix/24 as of June 2026
Common Borrowed Prefixes/25, /26, /27, /28, /29, /30, /31 as of June 2026
Usable Hosts Formula2^host bits – 2 as of June 2026
Block Size Shortcut256 minus the subnet mask octet as of June 2026
Best Use CaseSmall LAN design, department segmentation, and exam-style subnet planning as of June 2026

Subnet mask math sounds harder than it is. Once you understand where the network bits stop and the host bits begin, the rest becomes a pattern: borrow a bit, double the subnets, shrink the host space, and write down the ranges.

This matters in day-to-day work because the wrong mask creates real problems. A workstation may think a remote device is local, a DHCP scope may run out too soon, or a router interface may sit in the wrong range.

For readers studying the CompTIA N10-009 Network+ Training Course, this is the exact kind of skill that shows up in troubleshooting, DHCP planning, and switch-related network segmentation. It is also one of the fastest ways to earn points in an exam environment because the pattern never changes.

Understanding Class C Addressing Basics

A Class C network is the traditional IPv4 classful model where the first three octets identify the network and the last octet identifies the host. In the default setup, the mask is 255.255.255.0, which is the same as /24.

That means you get 24 network bits and 8 host bits. In plain terms, the network portion stays fixed, and the last octet gives you address space for devices, gateways, printers, and other hosts.

Why the old class names still show up

Classful networking is mostly a historical concept now, but the terminology is still everywhere in training, troubleshooting, and interviews. People still say “Class C” when they really mean a /24 network, because it is a fast shorthand that most network professionals understand immediately.

This is also why you should know both the classful name and the CIDR notation. A technician may say “give me a Class C subnet,” while a router configuration and subnet calculator will care only about the prefix length.

Why binary matters from the start

Binary is the foundation of every accurate Subnet Calculation. Each octet is eight bits, and each bit position has a decimal value: 128, 64, 32, 16, 8, 4, 2, and 1.

If you cannot recognize those values quickly, subnetting feels random. If you can, every mask becomes a pattern you can read in seconds.

Subnetting is not memorizing tables. It is understanding how 1s and 0s divide a 32-bit IPv4 address into a network portion and a host portion.

For official IPv4 and addressing background, Microsoft’s documentation on networking concepts is useful, especially when you are connecting this topic to real platform configuration in Windows environments. See Microsoft Learn for vendor guidance on IP configuration and networking fundamentals.

How Does a Subnet Mask Work?

A Subnet Mask is a bitwise filter that separates the network bits from the host bits in an IPv4 address. When a bit is set to 1, that bit belongs to the network portion; when it is set to 0, that bit belongs to the host portion.

The device compares its own IP address with another address using the mask. If the network portion matches, the destination is treated as local and sent directly; if it does not match, traffic goes to the default gateway.

A simple /24 example

In a /24 network, the mask is 255.255.255.0. In binary, that is 11111111.11111111.11111111.00000000.

The first three octets are all network bits. The last octet is all host bits. That means 192.168.10.15 and 192.168.10.77 are on the same subnet, but 192.168.11.10 is not.

Note

The subnet mask does not change the IP address itself. It changes how the device interprets the address and decides what belongs locally versus remotely.

This is why Network Planning starts with the mask, not the host count alone. A good design uses the mask to separate departments, limit broadcast scope, and keep routing simple.

For standards-based network design and segmentation logic, NIST guidance is a strong reference point. See NIST CSRC for security and architecture publications that support well-organized network design.

Binary Refresher for Subnetting

Subnetting becomes manageable once you can read a single octet in binary. The eight bit positions map to these values: 128, 64, 32, 16, 8, 4, 2, and 1.

If you want to convert a decimal value into binary, subtract the largest bit value you can use, then continue down the list. For example, 240 becomes 11110000 because 128, 64, 32, and 16 add up to 240.

Recognizing common mask values

Some binary patterns appear constantly in subnetting. 255 is 11111111, 248 is 11111000, 240 is 11110000, 224 is 11100000, 192 is 11000000, 128 is 10000000, and 0 is 00000000.

These patterns tell you how many bits are borrowed and how many remain for hosts. Once you can recognize those octets by sight, you can read a mask without doing full conversions every time.

How to see borrowed bits fast

  1. Find the octet where the mask stops being 255.
  2. Convert that octet into binary.
  3. Count the 1s to see how many network bits are used in that octet.
  4. Count the 0s to see how many host bits remain in that octet.

For example, /26 means 26 network bits total. Since /24 is the default Class C mask, you borrowed 2 host bits from the last octet, leaving 6 host bits.

That pattern drives every part of Subnetting, from host counts to broadcast addresses. The same logic works on paper, in a calculator, or during a live troubleshooting session.

Calculating Subnet Masks Step by Step

Start with the default Class C mask of 255.255.255.0, which gives you 8 host bits. When you borrow host bits, you create more subnets and reduce the number of usable host addresses in each subnet.

Each borrowed bit doubles the number of subnets. Borrow 1 bit and you get 2 subnets. Borrow 2 bits and you get 4. Borrow 3 bits and you get 8.

  1. Start with /24 and decide how many subnets or hosts you need. If you need fewer hosts per segment but more segments overall, borrow more bits. If you need more hosts, borrow fewer bits.

  2. Borrow the minimum bits required to meet the design. A /25 borrows 1 bit, /26 borrows 2, /27 borrows 3, /28 borrows 4, /29 borrows 5, /30 borrows 6, and /31 borrows 7.

  3. Convert the mask to dotted decimal. The interesting octet changes in predictable blocks: /25 is 255.255.255.128, /26 is 255.255.255.192, /27 is 255.255.255.224, /28 is 255.255.255.240, /29 is 255.255.255.248, /30 is 255.255.255.252, and /31 is 255.255.255.254.

  4. Calculate the usable hosts with 2^host bits – 2. The minus 2 accounts for the network address and broadcast address in standard subnets.

  5. Find the block size using 256 minus the mask octet. If the mask is 255.255.255.192, the block size is 64. That means the subnets start at 0, 64, 128, and 192 in the last octet.

Here is the key idea: the mask tells you how much space each subnet gets, while the block size tells you where each subnet begins. If you know one, you can derive the other quickly.

Official IPv4 routing and mask behavior are also documented in Cisco’s technical resources, which is useful when you validate your subnetting against real router configurations. See Cisco for platform documentation and networking references.

Common Class C Subnet Masks and Their Uses

The most common Class C subnet masks are the ones between /25 and /30. They give you practical subnet sizes for everything from a small office LAN to a point-to-point link.

255.255.255.128 /25 2 subnets, 126 usable hosts each. Good for two large groups or a network split into equal halves.
255.255.255.192 /26 4 subnets, 62 usable hosts each. Useful for small departments or branch segments.
255.255.255.224 /27 8 subnets, 30 usable hosts each. A strong fit for teams, labs, or voice/data separation.
255.255.255.240 /28 16 subnets, 14 usable hosts each. Common for tightly controlled segments or infrastructure groups.
255.255.255.248 /29 32 subnets, 6 usable hosts each. Good for tiny management groups or small device clusters.
255.255.255.252 /30 64 subnets, 2 usable hosts each. Traditionally used for point-to-point links.
255.255.255.254 /31 128 subnets, special two-address point-to-point behavior in supported environments.

A /27 is one of the most practical choices in real environments because 30 usable hosts often fits a small team, a support pod, or a lab segment. A /30 is much smaller and is usually reserved for router-to-router links where only two endpoints are needed.

When choosing a mask, do not pick the smallest one you can get away with. Build in enough room for printers, management interfaces, DHCP reservations, and normal growth.

For address planning and operational impact, BLS occupational data can help frame why these skills matter. The BLS Network and Computer Systems Administrators outlook page shows the role expectations tied to configuration and maintenance work.

How Do You Calculate Usable Hosts per Subnet?

Usable hosts per subnet are calculated with the formula 2^host bits – 2. The subtraction removes the network address and the broadcast address, which are not assigned to devices in a standard subnet.

That means a /25 has 7 host bits, so 2^7 – 2 = 126 usable hosts. A /26 has 6 host bits, so 2^6 – 2 = 62. A /27 has 5 host bits, so 2^5 – 2 = 30.

Why /31 and /32 are special

/31 and /32 do not behave like standard LAN masks. A /31 is commonly used on point-to-point links where both addresses are usable under the relevant standards and implementation rules, while a /32 typically represents a single host route or loopback address.

For normal subnetting exercises, you should still treat the minus-2 rule as the default unless the scenario explicitly calls out one of these special cases. That is the safest exam and operational habit.

Practical host planning

Network planners rarely use every theoretical host slot. You usually reserve addresses for the gateway, network equipment, servers, printers, and static assignments, then allocate the remainder to DHCP pools.

  • Gateway/router for default routing
  • DNS and DHCP services if they live in the subnet
  • Printers and network appliances that need stable addresses
  • Reserved space for growth or troubleshooting

That is why a /26 with 62 usable hosts may be a better design choice than a /27 with 30 usable hosts, even when the current user count is lower. You are planning for the device count you will actually support, not the number you wish you had.

For vendor-neutral host planning concepts, the IETF is the standards body behind Internet protocol behavior, and its work is the foundation for how these address rules are implemented.

How Do You Determine Subnet Ranges and Broadcast Addresses?

The easiest way to determine subnet ranges is to calculate the block size. Take 256 and subtract the subnet mask’s interesting octet. If the mask is 255.255.255.192, then 256 – 192 = 64.

That tells you the subnets in the last octet start at 0, 64, 128, and 192. Each subnet has a broadcast address just before the next network starts.

Example of a /26 split

A /26 divides a Class C network into four equal subnets. Here is the pattern:

  • 192.168.1.0/26 with usable hosts 192.168.1.1 to 192.168.1.62 and broadcast 192.168.1.63
  • 192.168.1.64/26 with usable hosts 192.168.1.65 to 192.168.1.126 and broadcast 192.168.1.127
  • 192.168.1.128/26 with usable hosts 192.168.1.129 to 192.168.1.190 and broadcast 192.168.1.191
  • 192.168.1.192/26 with usable hosts 192.168.1.193 to 192.168.1.254 and broadcast 192.168.1.255

The next subnet is always found by adding the block size to the current network address. If you are on 192.168.1.64/26, the next subnet begins at 192.168.1.128.

Warning

Do not confuse the broadcast address with a usable host. The broadcast is the last address in the subnet, and using it for a device will create connectivity problems.

This step is also where documentation matters. Good Network Planning records the network address, mask, gateway, and broadcast address so the next person does not have to reverse-engineer your design.

For broader network control concepts, Cisco’s routing and addressing documentation is a practical reference point when you want to match theory with real device behavior. See Cisco.

Worked Examples for Class C Subnetting

The fastest way to make subnetting stick is to work through real examples. Once you see the same pattern several times, the numbers stop looking arbitrary.

Example of splitting one /24 into two subnets

If you start with 192.168.10.0/24 and borrow 1 bit, you get /25. The mask becomes 255.255.255.128, and the block size is 128.

The two subnets are 192.168.10.0/25 and 192.168.10.128/25. Each subnet supports 126 usable hosts, which is ideal when a single Class C network needs to be split into two major segments.

Example of a team of 30 devices

A team of 30 devices needs at least 30 usable addresses, not 30 total addresses. A /27 provides exactly 30 usable hosts, so 255.255.255.224 is the smallest standard mask that fits the requirement.

That makes /27 a clean answer in many operational scenarios. It supports the team, the gateway, and a few infrastructure devices without wasting as many addresses as a /26.

Example of finding the smallest mask for a required host count

If you need 50 usable hosts, a /27 is too small because it only provides 30. A /26 gives you 62 usable hosts, which satisfies the requirement with room left for growth.

This is the correct way to choose a mask: start from the host requirement, then work upward until the usable host count is high enough. Choosing the “closest-looking” subnet without doing the math is how bad designs happen.

Example of subnetting into eight pieces

If you borrow 3 bits from a /24, you get /27 and eight subnets. The block size is 32, so the subnets begin at 0, 32, 64, 96, 128, 160, 192, and 224.

Each subnet supports 30 usable hosts. This is often a good fit for department-level segmentation, especially where you want to limit broadcast traffic and keep policies simple.

For reference on job expectations tied to this type of work, the U.S. Department of Labor provides general workforce information that helps connect networking tasks with real operational roles.

What Are the Common Mistakes to Avoid?

The most common subnetting mistake is confusing total addresses with usable hosts. A /26 has 64 total addresses, but only 62 usable hosts because the first address is the network and the last is the broadcast.

Another frequent error is reading binary too quickly and losing track of the bit boundary. If you misread 11110000 as 11111000, your subnet math will be wrong from that point forward.

  • Counting total addresses instead of usable addresses
  • Using the wrong block size
  • Misidentifying the broadcast address
  • Assuming every subnet must be the same size when the design calls for something else
  • Guessing based on memory instead of calculating from the required host count

One practical check is to ask whether the next subnet starts exactly one block later. If it does not, you probably made a binary or decimal conversion mistake.

Another good check is to compare your answer against the actual device count and planned growth. A subnet that “fits” today but leaves no room for a gateway, printers, and DHCP reservations will cause headaches later.

For security and organizational planning, the NIST framework approach is useful because it reinforces structured design, documentation, and predictable control boundaries.

What Tools and Shortcuts Help You Calculate Subnets Faster?

You do not have to do every Subnet Calculation in your head, but you should know how to verify it manually. The best approach is a mix of mental shortcuts, reference tables, and documentation discipline.

Useful shortcuts

  • 256 minus the mask octet gives you block size fast
  • 2^host bits – 2 gives you usable hosts for standard subnets
  • Borrowed bits double subnets every time you add one more bit
  • Count in the interesting octet only when the prefix is within one octet of the boundary, like /25 through /30 in Class C

Tools that speed up verification

Subnet calculators are useful for confirmation, especially during planning or after an interview exercise. CIDR tables and binary-to-decimal charts are also handy when you need to validate an answer quickly without recalculating from scratch.

For hands-on practice, device vendor docs are better than random internet calculators because they tie the math to real configuration behavior. Microsoft Learn is especially useful when you are checking IP settings on Windows hosts or servers, while Cisco documentation is valuable for router and switch interfaces.

Pro Tip

When documenting a subnet plan, write the network address, prefix length, gateway, DHCP range, and broadcast address in the same line. That makes future troubleshooting much faster, especially when multiple VLANs or departments share the same Class C block.

If you work in infrastructure or security, this is also part of good operational hygiene. Clear subnet documentation reduces the chance of overlap, makes switch and DHCP troubleshooting easier, and supports cleaner change management.

For workforce context on why these skills matter in practice, CompTIA’s own resources and industry workforce reporting consistently emphasize foundational networking knowledge. See CompTIA for vendor and workforce references tied to IT fundamentals.

Key Takeaway

Subnetting a Class C network starts with the /24 default and ends with accurate ranges, usable host counts, and clear documentation.

  • Borrowing host bits increases the number of subnets and reduces usable hosts.
  • The block size tells you where each subnet starts and where the broadcast ends.
  • The standard usable-host formula is 2^host bits – 2 for normal subnets.
  • /27 supports 30 usable hosts, making it a common fit for small teams.
  • Good IP Addressing and Network Planning prevent overlap, waste, and troubleshooting delays.
Featured Product

CompTIA N10-009 Network+ Training Course

Discover essential networking skills and gain confidence in troubleshooting IPv6, DHCP, and switch failures to keep your network running smoothly.

Get this course on Udemy at the lowest price →

Conclusion

Calculating subnet masks for Class C networks is a repeatable process once you understand the relationship between bits, masks, and host space. Start with the default /24, borrow only the bits you need, convert the result to dotted decimal, and use block size to map the ranges correctly.

If you remember only three things, make them these: binary drives the answer, host count drives the choice, and the subnet mask drives the boundaries. That is the core of practical Subnet Calculation, and it is one of the most valuable foundations in networking.

Practice with /25 through /30 until the patterns feel automatic. Then take the next step in your CompTIA N10-009 Network+ Training Course work by applying those same skills to IPv6, DHCP, and switch failure troubleshooting, where correct addressing decisions save time immediately.

CompTIA® and Network+™ are trademarks of CompTIA, Inc.

[ FAQ ]

Frequently Asked Questions.

What is the default subnet mask for a Class C network?

The default subnet mask for a Class C network is /24, which corresponds to 255.255.255.0 in dotted decimal notation. This means that the first 24 bits of the IP address are used for network identification, and the remaining 8 bits are used for host addresses.

The /24 subnet mask allows for up to 256 IP addresses within the network, with 254 usable for hosts (subtracting network and broadcast addresses). This is ideal for small networks, such as small offices or departmental segments.

How do I calculate a custom subnet mask for a Class C network?

To calculate a custom subnet mask for a Class C network, determine how many subnets or hosts you require. Borrow bits from the host portion of the default /24 mask to create additional network segments. For example, borrowing 2 bits from the host portion results in a /26 mask (255.255.255.192).

This process involves converting the number of borrowed bits into decimal form, then applying the new mask to your network. Each borrowed bit doubles the number of subnets, while reducing the number of hosts per subnet accordingly. Use subnet calculators or binary math to simplify this process.

What is the relationship between subnet masks and host counts in Class C networks?

In Class C networks, the subnet mask determines how many bits are allocated for network and host identification. The more bits you borrow from the host portion to create subnets, the fewer hosts are available per subnet.

For example, a /24 mask allows for 254 hosts, while a /26 mask allows for 62 hosts. This trade-off enables network administrators to design subnets tailored to their specific needs, balancing the number of subnets against the number of hosts per subnet.

Why is subnetting important in Class C networks?

Subnetting is crucial in Class C networks because it enhances network efficiency, security, and management. By dividing a larger network into smaller subnets, administrators can reduce broadcast domains and improve network performance.

Additionally, subnetting allows for better IP address utilization, especially in environments where IP address space is limited. It also simplifies network troubleshooting and enhances security by isolating different segments of the network.

What are common mistakes to avoid when calculating subnet masks for Class C networks?

One common mistake is miscounting the number of bits to borrow, which can lead to incorrect subnetting and IP address conflicts. Always double-check binary conversions when adjusting subnet masks.

Another mistake is not considering the number of hosts needed per subnet, leading to subnets that are either too small or too large for your requirements. Using subnet calculators or planning tools can help avoid these errors and ensure accurate subnetting.

Related Articles

Ready to start learning? Individual Plans →Team Plans →
Discover More, Learn More
How To Calculate Subnet Masks For Class C Networks Learn how to calculate subnet masks for Class C networks to design… Understanding IP Class Types and Their Impact on Modern Networks Discover how IP class types influence modern network design, improve troubleshooting, and… Python Class Variables: Declaration, Usage, and Practical Examples Learn how to declare and use Python class variables effectively with practical… A Subnet ID is Calculated via a: A Comprehensive Guide Learn how to calculate subnet IDs using subnet masks and bitwise logic… Network+ Certification : The Key to Understanding Modern Networks Learn how Network+ certification enhances your networking skills, enabling you to troubleshoot… Demystifying VLANs and Subnets: A Practical Guide for Medium-Sized Networks Learn how to design and implement VLANs and subnets to optimize network…
Cybersecurity In Focus - Free Trial