Subnet calculator: hosts, addresses and ranges inside a CIDR.
Reveal the addresses inside a CIDR prefix and the hosts you can actually use.
Open Subnet calculatorWhat this tool tells you
A CIDR prefix says how many leading bits of an address belong to the network, and everything after that identifies a host inside it. Doing that arithmetic by hand is slow and easy to get wrong. This calculator runs entirely in the browser, so the network, mask, and usable range appear as you type.
Try it in SiteTrace
- Type the network in CIDR form, for example 192.168.1.0/24. Only IPv4 addresses with a prefix from zero to thirty-two are accepted.
- Read the Network and Subnet mask metrics. The mask is the same boundary written as four octets instead of a slash number.
- Check Total addresses against Usable hosts. For a normal prefix the two differ by two, the network address and the broadcast address.
- Note the first and last usable addresses, then write them down before you give a machine a fixed address.
- Read the Wildcard mask row if you are writing an ACL or a route entry. It is the inverse of the subnet mask.
This utility works locally in your browser. The screenshot shows one example result.
What your result looks like

How to read the information
- Network
- The base address of the block with the host bits cleared, written with the prefix. It names the entire range rather than a single host.
- Subnet mask
- A /24 shown in dotted notation, where the twenty-four leading bits are set and the remaining eight are free.
- Total addresses
- How many addresses the block contains, counting the network and broadcast addresses that cannot be assigned to hosts.
- Usable hosts
- The addresses available for devices, normally two fewer than the total. Prefixes of thirty-one and thirty-two follow RFC 3021 instead.
- Broadcast address
- The last address in the block, reserved for directed broadcasts. On a thirty-one or thirty-two prefix the tool reports it as not applicable.
- Wildcard mask
- The inverted subnet mask, used where ACLs and routing entries expect zeros to mean ignore. It is a matching rule, not a range.
What the example means
The calculator gives you the whole shape of a block in one pass: where it starts, where it ends, and how many devices can live inside it. Two addresses are usually spoken for, the network and broadcast ends. A prefix of thirty-one or thirty-two is the exception, and the tool handles both without a special mode.
On your Mac or Windows PC
Mac instructions
Open the calculator in a browser tab, or run this in Terminal if Python 3 is installed. The library prints the same network and mask without touching the network.
python3 -c "import ipaddress; n=ipaddress.ip_network('192.168.1.0/24'); print(n, n.netmask, n.broadcast_address, n.num_addresses)"A check from your computer reflects your own connection. It may differ from a remote test or the mockup shown here.
Keep this in mind
This is an IPv4 calculator only, so an IPv6 prefix will be rejected. It knows nothing about your router, and it cannot warn you that a static address sits inside a range your DHCP server already hands out. Check the DHCP pool before you fix an address by hand.