calculator subnet

IPv4 Subnet Calculator

Enter an IPv4 address and CIDR prefix to instantly calculate network details.

Tip: For point-to-point links, /31 is valid and provides two usable addresses.

Why a subnet calculator matters

Subnetting is one of the most practical networking skills you can learn. Whether you are setting up a home lab, segmenting office networks, preparing for Cisco or CompTIA exams, or troubleshooting routing issues, understanding subnet boundaries saves time and prevents outages.

A good subnet calculator converts raw input (an IP address and CIDR notation) into details you can immediately use: subnet mask, network address, broadcast address, wildcard mask, and usable host range. Instead of doing binary math by hand every time, you can validate your plan in seconds and move forward with confidence.

What this calculator subnet tool gives you

  • Network address (the first address in the subnet)
  • Broadcast address (the last address in the subnet, except /31 and /32 use cases)
  • Subnet mask in dotted-decimal format
  • Wildcard mask (useful in ACLs and route filtering)
  • Total addresses and usable host count
  • Usable host range for endpoint assignment
  • Binary view of IP and mask for quick learning and verification

Subnetting fundamentals in plain English

IP address + prefix length

In CIDR notation, an address like 192.168.50.77/26 means the first 26 bits identify the network portion and the remaining 6 bits identify hosts. More network bits means smaller subnet size; fewer network bits means larger subnet size.

Network and broadcast addresses

Every traditional IPv4 subnet has a network address (all host bits set to 0) and a broadcast address (all host bits set to 1). Host devices usually receive addresses between those two boundaries. That is why the classic formula for usable addresses is:

Usable Hosts = 2^(host bits) - 2

Two notable exceptions:

  • /31: commonly used for point-to-point links; both addresses can be used.
  • /32: a single-host route; exactly one address exists.

Subnet mask and wildcard mask

The subnet mask marks network bits with 1s and host bits with 0s. The wildcard mask is the inverse. For example:

  • /24 mask = 255.255.255.0
  • /24 wildcard = 0.0.0.255

Wildcard masks are especially common in access control lists and route statements on network equipment.

Quick worked examples

Example 1: 192.168.10.34/24

  • Mask: 255.255.255.0
  • Network: 192.168.10.0
  • Broadcast: 192.168.10.255
  • Usable hosts: 254
  • Range: 192.168.10.1 - 192.168.10.254

Example 2: 172.16.5.200/27

  • Mask: 255.255.255.224
  • Block size: 32 addresses
  • Network: 172.16.5.192
  • Broadcast: 172.16.5.223
  • Usable hosts: 30

Example 3: 10.0.0.9/30

  • Mask: 255.255.255.252
  • Network: 10.0.0.8
  • Broadcast: 10.0.0.11
  • Usable hosts: 2
  • Range: 10.0.0.9 - 10.0.0.10

CIDR cheat sheet (common prefixes)

  • /24 → 255.255.255.0 → 254 usable hosts
  • /25 → 255.255.255.128 → 126 usable hosts
  • /26 → 255.255.255.192 → 62 usable hosts
  • /27 → 255.255.255.224 → 30 usable hosts
  • /28 → 255.255.255.240 → 14 usable hosts
  • /29 → 255.255.255.248 → 6 usable hosts
  • /30 → 255.255.255.252 → 2 usable hosts
  • /31 → 255.255.255.254 → 2 usable addresses (point-to-point)
  • /32 → 255.255.255.255 → 1 address

Common subnetting mistakes to avoid

  • Assigning network or broadcast addresses to hosts in regular subnets
  • Using the wrong prefix length after copying a previous configuration
  • Mixing decimal and binary calculations without verification
  • Forgetting route summaries when VLAN counts grow
  • Ignoring future growth and choosing subnets that are too small

Practical planning workflow

When planning real networks, use this sequence:

  1. List each segment (users, servers, voice, management, guest Wi-Fi, transit links).
  2. Estimate current and future host counts per segment.
  3. Choose prefix sizes with room for growth.
  4. Calculate each subnet and verify boundaries with a subnet calculator.
  5. Document gateway, DHCP scope, static ranges, and ACLs per subnet.

Final thoughts

Subnetting does not need to be intimidating. Once you understand prefix length, host bits, and address boundaries, network design becomes much more predictable. Use the calculator above as a day-to-day helper, and then gradually challenge yourself to estimate results mentally before clicking calculate.

With repetition, subnet math becomes second nature—and that confidence pays off in troubleshooting, architecture, and certification exams.

🔗 Related Calculators

🔗 Related Calculators