subnetting calculator

IPv4 Subnetting Calculator

Enter an IPv4 address and CIDR prefix (0 to 32) to calculate network details instantly.

What a subnetting calculator does

A subnetting calculator turns a single IP and prefix length into all the key values network engineers care about: network address, broadcast address, subnet mask, host range, and usable host count. Instead of doing bitwise math on paper every time, you can verify your design in seconds.

This is especially useful when planning VLANs, creating DHCP scopes, configuring router interfaces, troubleshooting ACL behavior, or studying for networking exams.

How to use this calculator

  • Enter a valid IPv4 address (for example, 10.20.30.40).
  • Enter a CIDR prefix from /0 to /32.
  • Click Calculate Subnet.
  • Review all outputs, including binary mask and wildcard mask.

The output includes both traditional host calculations and edge-case behavior for /31 and /32 networks.

Worked example: 192.168.10.37/27

For /27, the subnet mask is 255.255.255.224. That means each subnet has 32 total addresses. Subnets increment by 32 in the last octet:

  • 192.168.10.0 – 192.168.10.31
  • 192.168.10.32 – 192.168.10.63
  • 192.168.10.64 – 192.168.10.95
  • ...and so on

Since 37 falls inside 32–63, the network is 192.168.10.32, broadcast is 192.168.10.63, and the usable host range is 192.168.10.33–192.168.10.62.

Key subnetting terms you should know

Network address

The first address in a subnet. It identifies the subnet itself and is not usually assigned to a host.

Broadcast address

The last address in a subnet. It is used to send traffic to all hosts in that subnet (except in special cases like /31).

Usable host range

The addresses between network and broadcast. These are typically available for endpoints, servers, or interface IPs.

Wildcard mask

The inverse of the subnet mask, often used in Cisco ACLs and route filtering.

Common CIDR blocks (quick reference)

  • /24 = 255.255.255.0 (256 total / 254 usable)
  • /25 = 255.255.255.128 (128 total / 126 usable)
  • /26 = 255.255.255.192 (64 total / 62 usable)
  • /27 = 255.255.255.224 (32 total / 30 usable)
  • /28 = 255.255.255.240 (16 total / 14 usable)
  • /29 = 255.255.255.248 (8 total / 6 usable)
  • /30 = 255.255.255.252 (4 total / 2 usable)
  • /31 = 255.255.255.254 (special point-to-point behavior)
  • /32 = 255.255.255.255 (single host route)

Common mistakes when subnetting

  • Confusing total addresses with usable host addresses.
  • Forgetting that block sizes are powers of two.
  • Using a host IP as a network or broadcast address by mistake.
  • Ignoring special-use ranges (private, loopback, link-local, multicast).
  • Using incorrect wildcard masks in ACL entries.

Subnetting in real-world network design

In production environments, subnetting is a capacity and security decision—not just math. Smaller subnets reduce broadcast traffic, improve fault domains, and simplify policy boundaries. Larger subnets reduce route count and can simplify operations. The right choice depends on growth, segmentation requirements, and routing strategy.

For example, many teams reserve larger blocks for server or cloud segments and use tighter masks for management, transit, or point-to-point links. Combining subnetting with VLAN design and route summarization leads to cleaner, more scalable networks.

Final tip

Use this calculator to validate your work, but still learn the binary logic behind subnetting. Once you understand how mask bits carve the network and host portions, troubleshooting becomes much faster and more intuitive.

🔗 Related Calculators