How to use the CIDR calculator
Type an address block in any of the accepted forms and every figure updates live. You can enter classless inter-domain routing (CIDR) notation such as 192.168.1.0/24, an address with a dotted subnet mask such as 10.0.0.0 255.0.0.0, or a bare address such as 172.16.5.4 (treated as a single host, /32). IPv6 works the same way: enter a prefix like 2001:db8::/48 and the first address, last address and total address count are computed with full 128-bit precision. The network and broadcast rows are highlighted because they are the two addresses you usually cannot assign to a host.
What CIDR notation means
CIDR notation writes an address followed by a slash and a prefix length — the number of leading bits that identify the network. In 192.168.1.0/24 the /24 means the first 24 bits are the network portion and the remaining 8 bits are available for hosts, giving 28 = 256 addresses. The prefix length maps directly to a subnet mask: /24 is 255.255.255.0, /16 is 255.255.0.0, and so on. Shorter prefixes mean larger blocks; a /8 covers over sixteen million addresses, while a /30 covers just four. Because the boundary can fall anywhere, CIDR replaced the old fixed class A/B/C system and lets address space be allocated in right-sized blocks.
What each result means
The calculator reports the complete picture of the block so you can plan or audit a subnet at a glance:
- Network address — the first address, with all host bits set to zero; it names the subnet and is not assigned to a device.
- Broadcast address — the last address, with all host bits set to one; traffic sent here reaches every host on the subnet.
- Usable host range — the first and last addresses you can actually assign, i.e. everything between the network and broadcast.
- Total addresses — 2 raised to the number of host bits, including network and broadcast.
- Usable hosts — total addresses minus the two reserved ones (with the /31 and /32 exceptions below).
- Subnet mask & wildcard mask — the mask in dotted-decimal and its bitwise inverse, the latter used in router access control lists.
- Class & type — the legacy class (A–E) and whether the block is private (RFC 1918), loopback, link-local, carrier-grade NAT, multicast or public.
The /31 and /32 edge cases
Two prefix lengths break the simple "subtract two" rule, and the calculator handles both correctly. A /32 describes exactly one address — a single host or route — so the network, broadcast and host are all the same address and the usable count is one. A /31 describes two addresses; under RFC 3021 both are usable on a point-to-point link, because such links have only two endpoints and need no separate network or broadcast address. Getting these right matters when you are counting addresses for point-to-point WAN links or loopback interfaces, where an off-by-one assumption wastes scarce space.
IPv6 prefixes
IPv6 uses the same prefix idea over a 128-bit address, so a /64 — the standard size for a single LAN — contains 264 addresses, a number far too large for ordinary integers. This tool uses JavaScript BigInt so the first address, last address and total count are exact rather than rounded. It expands :: shorthand, re-compresses the result to canonical form, and identifies whether the prefix falls in the global unicast, unique-local (fc00::/7), link-local (fe80::/10), loopback or multicast range. Because IPv6 subnets are so large, the concept of "usable hosts minus two" is generally not applied; the address count is reported in full.
Why subnet locally
Subnetting is pure, deterministic bit arithmetic, which is exactly the kind of task where a real calculator beats asking an AI assistant — language models routinely make off-by-one errors on host counts and miscompute broadcast addresses, and they present those mistakes with full confidence. This tool applies the same exact operations a router does, every time. It also runs entirely in your browser, so your internal addressing plan — often considered sensitive infrastructure information — never travels to a third-party server. Paste a whole allocation table, work offline, and close the tab when you are done.
Frequently asked questions
- What is the difference between the network and broadcast address?
- The network address is the first address (host bits all zero) and names the subnet; the broadcast is the last address (host bits all one) and reaches every host. Neither is normally assignable, so a /24 has 256 addresses but 254 usable hosts.
- Why does a /31 show two usable hosts?
- RFC 3021 allows /31 on point-to-point links where both addresses are usable endpoints. A /32 is a single host.
- What is a wildcard mask?
- The bitwise inverse of the subnet mask — /24 gives 0.0.0.255 — used to match address ranges in router access control lists.
- Are my IP addresses sent anywhere?
- No. Everything is computed locally with bitwise and BigInt math, so your network details never leave your device.