CalcHub

Subnet Calculator

Enter an IP address and CIDR prefix to get the network address, broadcast address, subnet mask in dotted decimal and CIDR notation, wildcard mask, and total usable host count.

Learn More About Subnet Calculator

What a subnet calculator helps you find

A subnet calculator breaks an IPv4 network into the values that matter most for planning and troubleshooting: network address, broadcast address, subnet mask, wildcard mask, and usable host count.

That makes it easier to verify configurations and understand how much address space is available inside a given CIDR block.

Example subnet calculation

For a network like 192.168.1.34/24, the network address is 192.168.1.0 and the broadcast address is 192.168.1.255. That leaves 254 usable host addresses in between.

Smaller prefixes like /30 or /29 dramatically reduce the available hosts, which is why checking the result before deployment is so important.

Where subnet calculations are useful

Subnetting comes up in network design, firewall rules, cloud configuration, router setup, lab work, and certification study. It is a core skill whenever you need to divide address space efficiently or confirm whether devices belong to the same network.

Even if you know the formulas, using a calculator is a practical way to double-check mask lengths and avoid avoidable addressing errors.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses a subnet as an IP address followed by a slash and a prefix length — for example, 192.168.1.0/24. The number after the slash (/24) tells you how many bits are used for the network portion of the address. /24 means the first 24 bits are the network, leaving 8 bits for host addresses.

How do I calculate usable host count?

If you have n bits remaining for hosts, the total number of addresses is 2^n. Two of these are always reserved — the network address (all zeros) and the broadcast address (all ones) — so usable hosts = 2^n - 2. For a /24 network: 2^8 - 2 = 254 usable hosts.

What is a subnet mask?

A subnet mask is a 32-bit number that masks an IP address to separate the network and host portions. In binary, network bits are 1s and host bits are 0s. The classic /24 subnet has a mask of 255.255.255.0 in dotted decimal notation, meaning the first three octets are the network and the last octet is for hosts.

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask — host bits become 1s and network bits become 0s. It is commonly used in firewall rules and router ACLs (Access Control Lists) to specify a range of IP addresses. For /24, the wildcard mask is 0.0.0.255.

Related Calculators