CIDR subnet calculator
Type an address with a prefix, such as 192.168.1.0/24, and the calculator returns the mask, the wildcard, the network address, the broadcast, the first and last usable host, the total number of addresses and the reverse DNS zone for that block. It also splits a network into smaller prefixes and tells you how many subnets came out of it.
The arithmetic runs on the prefix, not on the mask written out in full. That matters because a mask is only the visual form of the set bits: /23 is 255.255.254.0, and a mask with a bit lost in the middle — 255.255.253.0, for instance — is not a prefix at all, so the page says so instead of rounding to the nearest number.
What you see on screen is the view from the machine that typed it. The tool applies the addressing rules and the ranges reserved by the RFCs, but it does not know whether that block is yours, whether it is already in use, or whether your router agrees. Before you create a new address, check your addressing plan: two sites quietly using the same /24 is a problem no calculator solves.
Everything runs in your browser. The address you type is never sent to a server, nothing is stored when you close the page, and the calculator keeps working if the connection drops after the page has loaded.
How to use
- Write the prefix in the field: it accepts CIDR form (10.0.0.0/8), a mask separated by a space (10.0.0.0 255.0.0.0), and a bare address, which is treated as a /32 host.
- Read the first and last host rows. Those are the bounds you give to DHCP, and they are what changes when the prefix grows — the network and broadcast addresses stay outside that range on purpose.
- To cut the network, type the new prefix in the “Split into” field. The screen reports how many subnets exist and shows a sample of the first ones; the ceiling is 2048 networks, above which the list would not fit on the page.
- Check the reverse DNS row before you ask your provider to delegate a zone: with a prefix that is a multiple of 8 the zone is the reversed whole octets, and otherwise RFC 2317 writes the boundary octet and the prefix, as in 64/10.100.in-addr.arpa.
How to split a network without mental arithmetic
The rule is borrowed bits: to split a network into smaller prefixes you borrow bits from the host part. Each borrowed bit doubles the number of networks and halves the block, so `2^(new-current)` is how many subnets are born and `2^(32-new)` is how many addresses each one holds. A /24 split into /26 borrows 2 bits: 4 networks of 64 addresses.
A /24 has 256 addresses but only 254 usable ones, because both ends of the range have a job: the first address names the network and the last one is local broadcast. No host is given either of them, which is why a 255.255.255.0 mask never carried 256 machines, however the powers of two suggest it.
Two prefixes break that minus-2 rule. A /32 is a single host: the two reserved ends do not exist separately, so the count is 1 usable address, and that is how you write the address of an interface or a service loopback. A /31 is the RFC 3021 point-to-point link: two addresses, both usable, no network and no broadcast, because a link with exactly two ends has nobody to broadcast to.
The private ranges are always the same three: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, from RFC 1918. The upper bounds matter more than the starts — 172.16.0.0/12 ends at 172.31.255.255, so 172.32.0.0 is already public; and 100.64.0.0/10, which many people mistake for private space, is RFC 6598 CGNAT, not routable on the internet but not yours either.
The table below holds the numbers the library itself returns for the most common prefixes, re-checked on every run of this site’s test suite:
| Prefix | Usable addresses | Where it shows up |
|---|---|---|
| 10.0.0.0/8 | 16,777,214 | RFC 1918 — the large private network, one single /8 |
| 172.16.0.0/12 | 1,048,574 | RFC 1918 — runs up to 172.31.255.255 |
| 192.168.0.0/16 | 65,534 | RFC 1918 — the range most home routers use |
| 192.168.1.0/24 | 254 | the subnet you most likely have at home |
| 100.64.0.0/10 | 4,194,302 | RFC 6598 (CGNAT) — shared by your provider |
| 169.254.0.0/16 | 65,534 | RFC 3927 (link-local) — the address you get without DHCP |