Subnet Calculator
Enter an IP and CIDR prefix or subnet mask to instantly get network, broadcast, host range, and mask details.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Type an IPv4 address such as 192.168.1.10 into the address field.
- 2.Choose CIDR prefix (for example /24) or switch to Subnet mask and enter one like 255.255.255.0.
- 3.Read the results table: network and broadcast addresses, the first and last usable host, usable and total host counts, subnet and wildcard masks, IP class, and RFC 1918 private status update instantly.
About Subnet Calculator
This subnet calculator turns an IPv4 address plus a CIDR prefix (like /24) or a dotted subnet mask (like 255.255.255.0) into everything you need to plan or troubleshoot a network — the network address, broadcast address, first and last usable host, total and usable host counts, subnet mask, wildcard mask, IP class, and whether the address is private under RFC 1918.
CIDR notation (RFC 4632) replaced the old fixed Class A/B/C boundaries: the number after the slash is how many leading bits identify the network, so /24 means 24 network bits and 8 host bits. The subnet mask is that same split written as four octets, and the wildcard mask — the mask's bit-for-bit inverse — is what access-control lists and OSPF use to match address ranges.
The network address is the first address in the block (all host bits zero) and the broadcast address is the last (all host bits one); neither can be assigned to a device, which is why usable hosts equals 2^(host bits) − 2. A /24 therefore gives 256 total addresses but 254 usable ones.
Two prefixes break that rule, and the calculator handles both. A /31 (RFC 3021) is meant for point-to-point links: with only two addresses, both are usable hosts and there is no separate network or broadcast address, giving 2 usable hosts instead of 0. A /32 describes a single host — network, broadcast, and host are the same address — so it reports 1 usable host, which is how loopbacks and single-host firewall rules are written.
Private ranges (RFC 1918) — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — are the blocks reserved for internal use behind NAT and never routed on the public internet, so knowing whether your address is private matters before you expose a service.
Everything is computed with 32-bit unsigned bitwise math in your browser; no address or query ever leaves your device.
Methodology & sources
IPv4 subnetting per RFC 950 / RFC 4632 (CIDR); point-to-point /31 per RFC 3021; private ranges per RFC 1918. Network = IP AND mask, broadcast = network OR wildcard, usable hosts = 2^(32-prefix) - 2 for prefixes up to /30. All computed with 32-bit unsigned bitwise math client-side.
Frequently asked questions
- Why does a /24 have 254 usable hosts instead of 256?
- A /24 has 256 total addresses, but the first (the network address) and the last (the broadcast address) are reserved and cannot be assigned to devices. That leaves 2^8 − 2 = 254 usable host addresses.
- How many usable hosts are in a /31 or /32?
- A /31 has 2 usable hosts. Under RFC 3021 it is used on point-to-point links where both addresses are valid hosts and there is no network or broadcast address. A /32 has 1 usable host — it describes a single address, so the network, broadcast, and host are all identical.
- What is the wildcard mask used for?
- The wildcard mask is the bit-for-bit inverse of the subnet mask (for /24 that is 0.0.0.255). It is used in Cisco access control lists and OSPF network statements to match a range of addresses, where a 1 bit means 'any value here' and a 0 bit means 'must match'.
Related tools
- JSON FormatterFormat, minify, and validate JSON in your browser — pretty-print or compress with pinpoint error locations.
- Diff CheckerCompare two texts line by line and see exactly what was added, removed, or unchanged — in your browser.
- UUID GeneratorGenerate cryptographically random RFC 4122 v4 UUIDs in bulk — copy one or all, in your browser.
- Excel Keyboard ShortcutsSearch practical Excel shortcuts by action, platform, and category, then copy the exact keys you need.
- JSON ValidatorCheck if JSON is valid, pinpoint syntax errors by line and column, and see a structure diagnostic, in-browser.
- JWT DecoderDecode a compact JWT header and payload locally, with a clear unverified warning.