CIDR & Subnet Calculator
IPv4 and IPv6. Network, broadcast, host range, masks and address class from any CIDR — plus subnet splitting, membership checks and supernet aggregation, computed locally with exact 128-bit arithmetic.
IPv4 and IPv6. Network, broadcast, host range, masks and address class from any CIDR — plus subnet splitting, membership checks and supernet aggregation, computed locally with exact 128-bit arithmetic.
A CIDR block such as 10.0.0.0/22 is an address plus a prefix length. The prefix length says how many leading bits are fixed — the network part — and the remaining bits vary across the hosts in the block. Everything this calculator shows follows from that one number, which is why it is worth being fluent in it rather than memorising a table.
The network address has every host bit set to 0; the broadcast address has every host bit set to 1. Neither can be assigned to a machine in IPv4. In a /22 the host part is 10 bits, so the block spans 1,024 addresses of which 1,022 are usable. IPv6 has no broadcast address: the all-ones address is an ordinary host, and the all-zeros "subnet-router anycast" address is reserved but routable.
The netmask is the prefix length written as 32 bits: /22 is 255.255.252.0. The wildcard mask is its bitwise inverse, 0.0.3.255, and is what Cisco access lists and OSPF network statements expect. Getting these backwards is the single most common mistake in a hand-written ACL, and it fails silently by matching the wrong hosts.
The result marks whether the address is private (RFC 1918 / RFC 4193 ULA), loopback, link-local, multicast, carrier-grade NAT (RFC 6598), documentation, or globally routable. The distinction matters when a block "works" on your LAN but cannot be reached from anywhere else — 100.64.0.0/10 is the classic surprise inside a cloud VPC.
Choose a longer prefix and the block is divided into equal subnets: a /22 into four /24s, or into sixteen /26s. Each subnet is listed with its own network, host range and broadcast. This is the operation behind VPC subnet planning, and the table can be exported as CSV straight into a spreadsheet.
Every address is converted to an integer — 32 bits for IPv4, 128 bits for IPv6 — using JavaScript's BigInt, so IPv6 blocks are computed exactly rather than approximated with floating point. The network address is address AND mask, the broadcast is network OR NOT mask, and the size of the block is 2^(bits − prefix). A /48 in IPv6 contains 280 addresses, or 65,536 /64 subnets, and both figures are shown precisely.
Prefix-length ranges follow the specifications: 0–32 for IPv4 and 0–128 for IPv6. Host counts subtract two for IPv4 blocks of /30 and shorter, treat a /31 as two usable addresses per RFC 3021 (the point-to-point convention), and a /32 as a single host. IPv6 usable counts are the full block size, because RFC 4291 reserves nothing at the top of a subnet.
| Prefix | Mask | Addresses | Usable hosts | Typical use |
|---|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 | An entire RFC 1918 range (10.0.0.0/8) |
/16 | 255.255.0.0 | 65,536 | 65,534 | A cloud VPC, a campus |
/22 | 255.255.252.0 | 1,024 | 1,022 | A large office subnet |
/24 | 255.255.255.0 | 256 | 254 | The everyday LAN |
/26 | 255.255.255.192 | 64 | 62 | A small VLAN, a cloud subnet per AZ |
/28 | 255.255.255.240 | 16 | 14 | A DMZ, a handful of servers |
/30 | 255.255.255.252 | 4 | 2 | A traditional point-to-point link |
/31 | 255.255.255.254 | 2 | 2 | A point-to-point link per RFC 3021 |
/32 | 255.255.255.255 | 1 | 1 | A single host route, a loopback |
192.168.1.37/24 is legal, and the calculator tells you the block is actually 192.168.1.0/24. Firewalls and routers vary in whether they accept the host form; some silently normalise it and others reject it, and a config that works on one vendor fails on the next./24s only form a /23 when the first is aligned to an even boundary: 10.0.2.0/24 and 10.0.3.0/24 aggregate to 10.0.2.0/23, but 10.0.3.0/24 and 10.0.4.0/24 do not. The supernet tool computes the smallest block that covers both and says whether it covers anything else as well.Two addresses in every IPv4 subnet of /30 or shorter are reserved: the first (all host bits zero) identifies the network itself, and the last (all host bits one) is the directed broadcast address. Neither can be assigned to an interface, so 256 becomes 254. The exception is a /31, which RFC 3021 defines as a two-address point-to-point link with no broadcast, so both addresses are usable.
No. IPv6 replaced broadcast with multicast. The all-ones address in a subnet is an ordinary assignable host address, and the all-zeros address is the subnet-router anycast address, which is reserved but still routes. That is why the calculator shows a broadcast row for IPv4 only, and why the usable count for an IPv6 block is the full block size.
They carry the same information in opposite polarity. A netmask has ones in the network bits (255.255.255.0 for a /24). A wildcard mask has ones in the host bits (0.0.0.255 for a /24) and is the form Cisco IOS access lists, OSPF and EIGRP network statements expect. The calculator shows both so you can paste whichever the device wants without inverting by hand.
65,536, because 64 minus 48 is 16 bits of subnet identifier and 2 to the power 16 is 65,536. A /56, the common residential allocation, holds 256 /64s. A /64 is the standard size for a single IPv6 LAN because SLAAC address autoconfiguration requires a 64-bit interface identifier; subnets smaller than /64 break it.
For IPv4: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918 private), 100.64.0.0/10 (RFC 6598 carrier-grade NAT), 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local), 224.0.0.0/4 (multicast), 240.0.0.0/4 (reserved), and the three documentation ranges 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24. For IPv6: ::1 (loopback), fc00::/7 (unique local), fe80::/10 (link-local), ff00::/8 (multicast), 2001:db8::/32 (documentation), ::ffff:0:0/96 (IPv4-mapped) and 2002::/16 (6to4).
No. The whole calculation runs in the page as JavaScript, and there is no server endpoint involved. You can confirm this by watching the Network tab of your browser's developer tools while you use the tool, or by loading the page and then disconnecting from the internet — it keeps working. Internal addressing plans are sensitive, and a subnet calculator is exactly the kind of tool that should never see them leave your machine.