🧮 Subnet Calculator
Network, broadcast, usable hosts and ranges for any IPv4 subnet.
CIDR notation, without the headache
A subnet is a slice of a network, and the slash number (the prefix) says where the slice is cut: how many of the address's 32 bits name the network, leaving the rest for hosts. This calculator takes any IPv4 address with a prefix (or a dotted netmask, if that is how your router shows it) and works out the full picture: the network and broadcast addresses that frame the range, the netmask and wildcard mask, how many addresses exist, how many are actually usable, and the first and last addresses you may hand out.
The two rules worth remembering
- Usable means total minus two in a normal subnet: the first address names the network itself and the last is the broadcast address, so a /24's 256 addresses give 254 usable hosts.
- Every prefix step doubles or halves the network. A /25 is half a /24 (128 addresses), a /23 is two /24s joined (512). Once that clicks, sizing a network becomes simple arithmetic instead of guesswork.
Edge cases are handled the standard way: a /31 point-to-point link has both addresses usable (RFC 3021), and a /32 is a single-host route. The calculator also labels the address type, private ranges like 192.168.x.x and 10.x.x.x, loopback, link-local and the shared space mobile carriers use, because "why can the internet not reach this address" is usually answered right there.
Frequently asked questions
What prefix does a home network use?
Almost always /24 (netmask 255.255.255.0): 254 usable addresses, which is plenty for a house. Routers default to it, and the familiar 192.168.1.1 is simply the first usable address in 192.168.1.0/24.
Why can I not use the network or broadcast address?
They are reserved by the protocol: the network address identifies the subnet itself in routing tables, and the broadcast address means "every host here", used for announcements. Assigning either to a device confuses both jobs.
What is a wildcard mask?
The netmask flipped bit for bit (a /24's 255.255.255.0 becomes 0.0.0.255). You meet it in router access-control lists and some firewall rules, which match on wildcard instead of netmask.
How do I choose a subnet size for an office?
Count devices, including phones, printers and guests, double it for growth, then pick the smallest prefix that fits: 60 devices today means a /25 (126 usable) is tight and a /24 is comfortable. Oversizing slightly is normal; undersizing means renumbering everything later.