Subnet Calculator
Calculate network address, broadcast address, usable host range, subnet mask, and wildcard mask from any IPv4/CIDR.
subnet-calc.sh
Examples:
All Subnets at this prefix
CIDR Reference Table
| CIDR | Subnet Mask | Total Addresses | Usable Hosts |
|---|
Frequently Asked Questions
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network mask as a single value: IP/prefix. The prefix length (e.g., /24) indicates how many bits are the network portion. 192.168.1.0/24 means the first 24 bits identify the network (192.168.1) and the last 8 bits identify hosts within it.
The network address is the first address in a subnet (all host bits = 0). It identifies the subnet itself and cannot be assigned to a host. The broadcast address is the last address (all host bits = 1) and is used to send packets to all hosts in the subnet simultaneously. Only the addresses between them (exclusive) are assignable to hosts.
/24 (Class C): 254 usable hosts, 256 total addresses. /16 (Class B): 65,534 usable hosts, 65,536 total. /8 (Class A): 16,777,214 usable hosts, 16,777,216 total. Formula: 2^(32-prefix) - 2 = usable hosts (subtract network and broadcast).
RFC 1918 defines three private IP ranges not routable on the public internet: 10.0.0.0/8 (Class A, 16.7M addresses), 172.16.0.0/12 (Class B, 1M addresses), and 192.168.0.0/16 (Class C, 65K addresses). These are used for local networks (home, office, data center) behind NAT.