No Signup Unlimited Usage Real Data 100% Free Privacy First Fast Results Export Reports Mobile Friendly

Subnet Calculator (CIDR)

IPv4 and IPv6 subnet calculator: network and broadcast address, first and last host, host count, netmask, wildcard, binary view, address type and reverse DNS zone — plus splitting a range into smaller subnets. Runs in your browser.

Fetching live data…

Quick answer

The Subnet Calculator works out everything about an IP range from its CIDR notation, for both IPv4 and IPv6. Enter something like 192.168.1.0/24, an address with a mask such as 10.0.0.5 255.255.0.0, or an IPv6 prefix like 2001:db8::/48, and it shows the network and broadcast addresses, the usable host range, the number of hosts, the netmask and wildcard mask, the binary layout and the reverse DNS zone. It can also split the range into smaller subnets. All the maths happens in your browser.

How it works

  1. The address and prefix length are read from what you type; a dotted subnet mask is converted to its prefix length, and a bare address is treated as a single host.
  2. The prefix decides how many leading bits belong to the network. The calculator keeps those bits and sets the rest to zero for the network address, or to one for the last address.
  3. For IPv4 it removes the network and broadcast addresses from the host count, except for /31 point-to-point links and /32 single hosts. IPv6 has no broadcast, so every address in the prefix counts.
  4. If you enter a longer prefix in the split field, the range is divided into equal subnets and listed in order.

What it shows

  • Network, broadcast, first and last host — the boundaries of the range.
  • Host count and total addresses — with exact numbers even for huge IPv6 prefixes.
  • Subnet mask, wildcard mask and hex — ready for router, firewall and ACL configuration.
  • Binary view — address, mask, network and broadcast in bits, with the network part highlighted.
  • Address type — private (RFC 1918), CGNAT, loopback, link-local, documentation, ULA or global, and the matching reverse DNS zone.
  • Subnet splitting — a /24 into four /26s, an IPv6 /48 into /64s, and so on.

Why it matters

Wrong subnet maths causes some of the hardest network faults to track down: devices that can reach some neighbours but not others, firewall rules that let too much through, or DHCP pools that collide. Planning address space — for VLANs, cloud VPCs, VPN tunnels or a whitelist on a server — means turning prefixes into ranges and back again many times, and a calculator removes the guesswork. When you need to know who owns a public range, look it up with the ASN Lookup.

Quick reference

A /24 is 256 addresses (254 hosts), a /25 is 128, a /26 is 64, a /27 is 32, a /28 is 16, a /29 is 8 and a /30 is 4 (2 hosts). Every step of one in the prefix halves the range. In IPv6 a /64 is the standard size for a single network, a /56 holds 256 of them and a /48 holds 65,536. The wildcard mask, used in Cisco ACLs and OSPF, is simply the subnet mask with every bit flipped.

Frequently asked questions

Why does a /24 have 254 usable hosts and not 256?

In IPv4 the first address of a subnet identifies the network itself and the last is the broadcast address, so neither can be given to a device. The exceptions are /31, which RFC 3021 allows for two-host links, and /32, a single address.

What if I enter an address that is not the start of the network?

The calculator finds the network that address belongs to — 192.168.1.130/26 belongs to 192.168.1.128/26 — and notes that you entered a host inside it.

Is anything sent to your server?

No. The calculation is done by a script in your browser, so you can use it for internal address plans. To see the public address you are using right now, open What Is My IP?.

Learn & Resources

Guides, tips and tutorials hand-picked for this tool — go from running a check to actually fixing it.