Subnet Calculator

Type an IPv4 address and a CIDR prefix, see the network address, broadcast, netmask, wildcard, host counts, IP class, and flags for private / loopback / link-local / multicast ranges. Slash, space, comma, or semicolon between IP and prefix — all work. Bulk mode below for one-per-line lists. Pure client-side, no upload.

or paste
Quick fill:
Enter an IP and prefix above to see the subnet breakdown.
one CIDR per line · up to 200
0 lines
How subnet math works
  • An IPv4 address is 32 bits. A CIDR prefix length N means the first N bits identify the network and the remaining (32 − N) bits identify the host.
  • The netmask is N ones followed by (32 − N) zeros. The wildcard mask is its bitwise inverse — the bits that vary inside the subnet.
  • The network address is the input IP ANDed with the mask. The broadcast is the network ORed with the wildcard.
  • For /30 and shorter the usable range is everything between, excluding the network and broadcast (so 2 addresses are lost). For /31 RFC 3021 makes both addresses usable (point-to-point links). For /32 there is exactly one usable address.
  • The class is the historical A/B/C/D/E grouping by leading octet. It doesn't affect routing today but is useful as a shorthand.
  • Private ranges are RFC 1918 (10/8, 172.16/12, 192.168/16) plus CGNAT (100.64/10). Loopback is 127/8. Link-local is 169.254/16. Multicast is 224/4.
  • This tool handles IPv4 only. IPv6 has a different address model (128-bit, no broadcast, interface identifiers) and is out of scope here.
  • Nothing leaves your browser. All math runs locally.