Subnet Calculator
Turn a CIDR block into the numbers you actually need — network, broadcast, host range and usable count.
Runs entirely in your browser
Loading tool...
How to use
- Type the network in CIDR notation, or paste an address and a dotted netmask.
- Read the network and broadcast addresses, and the host range between them.
- Check whether a specific address falls inside the block — the question a firewall rule asks.
- Copy any single value straight into a config file.
Features
- Prefix or dotted netmask, in either direction.
- Host range, usable count and the binary mask together.
- A /31 and a /32 are reported honestly rather than as having −1 hosts.
- Private ranges named, including loopback and link-local.
- Runs entirely in your browser.
Frequently asked questions
- Why are there two fewer usable hosts than addresses?
- The first address in a block names the network itself and the last is the broadcast address, so neither can be given to a machine. A /24 holds 256 addresses and 254 hosts. The exceptions are /31, used for point-to-point links where both addresses are usable, and /32, a single host — this tool reports those as they are rather than claiming a /31 has zero hosts.
- What does the wildcard mask do?
- It is the netmask with every bit flipped, and it is what Cisco access lists and OSPF configurations expect instead of a netmask. A /24 has netmask 255.255.255.0 and wildcard 0.0.0.255.
- Is a private address the same as a secure one?
- No. A private range is simply not routable across the internet — traffic to 192.168.1.5 does not leave your network because no ISP will carry it. Anything on the same network can still reach it, and NAT is not a firewall.
Related tools
Expand an IPv6 address in full, or shorten it to the one canonical form — the two that have to match when you compare them.
Everything this page can read about your browser, screen and system — shown to you instead of collected.
Break a URL into its scheme, host, path, query parameters and fragment.
Convert between binary, octal, decimal, hexadecimal and any base up to 36 — exactly, at any size.
Permissions in all three notations at once, including the special bits and what your umask actually gives you.