Subnet Calculator — IPv4 & IPv6 CIDR

Enter an IP with a prefix (10.0.0.0/22) or a subnet mask (192.168.1.10 255.255.255.0) to get the network, broadcast, usable hosts and binary breakdown — and split it into subnets.

Runs in your browserUpdated

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the Subnet Calculator

  1. Type an address with a prefix (/24) or with a dotted subnet mask.
  2. Read the network, broadcast and usable host range.
  3. Enter a longer prefix under Split into subnets to list every subnet of that size.

How subnetting works

An IPv4 address is 32 bits. The prefix length (the number after the slash in CIDR notation) says how many of those bits identify the network; the rest identify hosts. A /24 leaves 8 host bits: 256 addresses, of which the first is the network address and the last the broadcast address, leaving 254 usable hosts.

CIDR cheat sheet

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/22255.255.252.01,0241,022
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242
/31255.255.255.25422 (point-to-point, RFC 3021)
/32255.255.255.25511 (single host)

Private and special ranges

  • 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 — private networks (RFC 1918), not routed on the internet.
  • 100.64.0.0/10 — carrier-grade NAT shared space.
  • 169.254.0.0/16 — link-local, used when DHCP fails.
  • 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 — reserved for documentation.

Wildcard masks and cloud networks

A wildcard mask is the inverse of the subnet mask (0.0.0.255 for a /24) and is used in Cisco ACLs and OSPF. When planning AWS VPCs or Azure VNets, remember that the cloud reserves extra addresses: AWS keeps five per subnet (network, router, DNS, future use and broadcast).

IPv6

IPv6 addresses are 128 bits. Networks almost always use a /64 per LAN; ISPs hand out /48 or /56 blocks to customers, giving 65,536 or 256 LANs. Enter an IPv6 CIDR above to see the expanded form and range. Look up which addresses a name resolves to with the DNS lookup, or find your own public IP with What is my IP.

Tools that pair well with the Subnet Calculator

  • Port Checker — Test whether a server accepts connections on specific ports — web (80/443), mail (25/587/993), SSH, databases or remote desktop — and see which are open, closed or filtered by a firewall.
  • Ping Test — Measure how fast a server responds: enter a host and get the round-trip latency, jitter and failed attempts over several pings — measured from our server with a TCP ping to the port you choose.
  • Number Base Converter — Type a number in any base and see it in all the others instantly.
  • MIME Type Lookup — Search 200+ file extensions and MIME types — .webp, .woff2, .webmanifest, application/wasm … — or drop a file to detect its real type from its first bytes.

Frequently asked questions

How many hosts are in a /24?
256 addresses, 254 usable: the first is the network address and the last is the broadcast address.
What is the difference between a subnet mask and CIDR?
They express the same thing. 255.255.255.0 has 24 one-bits, so it is written /24 in CIDR notation.
Why does /31 have 2 usable hosts?
RFC 3021 allows /31 networks for point-to-point links, where no network or broadcast address is needed.
What does the wildcard mask mean?
It is the inverted subnet mask, used by Cisco ACLs: 0 bits must match, 1 bits are ignored.

Related tools