Network Tools

Subnet Calculator

Calculates network address, broadcast address, host range, total hosts, subnet mask and wildcard mask from a CIDR notation. Runs entirely in your browser — nothing is sent to the server.

Query Runs locally in your browser

What is Subnet Calculator?

A subnet calculator converts CIDR notation (like 192.168.1.0/24) into every value you need when designing or documenting an IPv4 network: the network address, broadcast address, usable host range, total number of hosts, subnet mask, and wildcard mask.

This runs entirely in your browser — the calculation is pure arithmetic on the IP address and prefix length, so nothing needs to be sent to a server and no network request is made at all.

How to use the Subnet Calculator tool

  1. 1 Enter an address in CIDR notation — an IP address followed by a slash and prefix length, e.g. 192.168.1.0/24.
  2. 2 Read the network address (the first address in the block) and broadcast address (the last).
  3. 3 Check the usable host range and total host count to see how many devices the subnet can actually accommodate.
  4. 4 Use the subnet mask and wildcard mask fields directly when configuring router ACLs, firewall rules, or DHCP scopes.

When you need this tool

  • Planning how to split a larger network block into smaller subnets for different departments, VLANs or sites.
  • Working out the usable host range before assigning static IPs on a new network segment.
  • Converting between CIDR prefix length and dotted-decimal subnet mask when configuring routers, firewalls or DHCP servers.
  • Checking whether two subnets overlap before merging or re-architecting a network.
  • Studying for networking certifications (CCNA, Network+) where subnetting by hand is a core skill.

How it works

The prefix length (the number after the slash) determines how many bits of the 32-bit IPv4 address are fixed as the network portion and how many are free for host addresses. The calculator applies the resulting subnet mask to the input address with bitwise AND to get the network address, flips the host bits to get the broadcast address, and derives the usable range and host count from there.

Frequently asked questions

Why do usable hosts equal total addresses minus 2?

The first address in any subnet is reserved as the network address and the last is reserved as the broadcast address — neither can be assigned to a device. A /24 has 256 total addresses but only 254 are usable for hosts.

What's the difference between a subnet mask and a wildcard mask?

A subnet mask marks network bits with 1s and host bits with 0s (e.g. 255.255.255.0). A wildcard mask is its inverse (0.0.0.255) and is used by some router and firewall configurations — notably Cisco access control lists — instead of a standard subnet mask.

What does the /24, /16, /8 number actually mean?

It's the prefix length — the number of leading bits in the 32-bit address that are fixed as the network portion. A /24 fixes the first 24 bits (leaving 8 bits, 256 addresses, for hosts); a /16 fixes 16 bits (leaving 65,536 addresses); a /8 fixes 8 bits (leaving over 16 million).

Does this tool support IPv6 subnetting?

No, this calculator is IPv4-specific. IPv6 subnetting uses the same bitwise principle but with 128-bit addresses and different conventions (typically /64 per subnet), which is out of scope for this tool.