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.

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.