network subnetting calculator

IPv4 Network Subnetting Calculator

Enter any IPv4 address and CIDR prefix (such as /24) to calculate network ID, broadcast, host range, subnet mask, wildcard mask, and more.

What this network subnetting calculator does

This tool helps you break down an IPv4 network quickly and accurately. Instead of doing binary math by hand every time, you can enter an IP address and prefix length to instantly see the exact subnet boundaries and usable host range.

It is useful for network engineers, system administrators, students preparing for CCNA/Network+ exams, and anyone planning VLANs, firewall rules, DHCP scopes, or route summaries.

Subnetting basics in plain language

IP address + prefix length defines the network

Every IPv4 address has 32 bits. The CIDR prefix (for example, /24) tells you how many of those bits belong to the network portion. The remaining bits are host bits.

  • Network address: first address in the subnet
  • Broadcast address: last address in the subnet
  • Usable host range: addresses between network and broadcast (with /31 and /32 exceptions)
  • Subnet mask: dotted decimal mask equivalent to the prefix (e.g., /24 = 255.255.255.0)

Why this matters

Correct subnetting improves performance, security, and scalability. It prevents overlapping ranges, helps isolate departments, and reduces broadcast traffic.

How to use the calculator

  • Enter a valid IPv4 address (example: 10.20.30.40).
  • Enter a prefix length from 0 to 32.
  • Click Calculate Subnet.
  • Review the output fields for planning and configuration.

Quick CIDR cheat sheet

  • /24 → 256 total addresses, 254 usable
  • /25 → 128 total addresses, 126 usable
  • /26 → 64 total addresses, 62 usable
  • /27 → 32 total addresses, 30 usable
  • /28 → 16 total addresses, 14 usable
  • /29 → 8 total addresses, 6 usable
  • /30 → 4 total addresses, 2 usable (common for point-to-point)
  • /31 → 2 usable (RFC 3021 point-to-point)
  • /32 → single host route

Real-world examples

Example 1: Office LAN

If you use 192.168.10.42/24, your network is 192.168.10.0/24, and hosts can use 192.168.10.1 through 192.168.10.254. This is a common setup for a small office or home lab.

Example 2: WAN point-to-point link

For a routed link between two routers, /30 is traditional and gives exactly two usable addresses. Many providers now use /31 to conserve address space.

Example 3: Route summarization

Understanding network boundaries lets you aggregate routes (supernetting), reducing routing table size and improving stability in larger networks.

Common subnetting mistakes to avoid

  • Using overlapping subnets across VLANs or sites
  • Forgetting that network and broadcast are reserved in most subnets
  • Misreading dotted masks like 255.255.255.224 (which is /27)
  • Assuming every subnet has the same host capacity
  • Ignoring future growth when choosing prefix lengths

FAQ

Is /31 valid?

Yes. On point-to-point links, /31 can provide two usable addresses without wasting network/broadcast addresses in the traditional sense.

What is the wildcard mask?

The wildcard mask is the inverse of the subnet mask and is commonly used in ACL configurations (especially in Cisco-style syntax).

Does this page support IPv6?

This calculator is focused on IPv4 subnetting. IPv6 subnet planning follows a different model and usually relies on /64 LANs and prefix delegation strategies.

🔗 Related Calculators

🔗 Related Calculators