CIDR Subnet Calculator

By JXXR1

Compute IPv4 subnets from CIDR notation. Network, broadcast, mask, host range, and binary view.

Example: 10.0.0.0/16, 172.16.5.0/24, 203.0.113.42/29
Enter input above to see the result.

Subnetting from CIDR notation

CIDR (Classless Inter-Domain Routing) notation compresses an IPv4 address and its subnet size into a single string: 192.168.1.0/24 means "the address 192.168.1.0 with a 24-bit network prefix"—equivalent to the older 255.255.255.0 mask notation, but far more compact. This tool decodes any CIDR expression into the practical values you actually need: the network address, broadcast address, subnet mask in dotted form, usable host range, total address count, and binary representation.

VLANs, firewalls, and cloud security groups

Network vs host bits

Edge cases and miscounting traps

Prefix lengths at a glance

Splitting a /16 and reading the output

Enter 10.0.0.0/16. The tool reports network 10.0.0.0, broadcast 10.0.255.255, subnet mask 255.255.0.0, wildcard 0.0.255.255, 65,536 total addresses and 65,534 usable, class A, and RFC 1918 private: yes — plus the IP, mask and network in binary. Type 10.0.5.200/16 instead and you get the identical block: the host bits are masked off, so both inputs describe the same network.

Usable counts, point-to-point links, and IPv6

Why 65,534 usable when there are 65,536 addresses? The first address (the network identifier) and the last (the broadcast address) can't be assigned to hosts. Every ordinary subnet loses those two, which is why a /24 gives 254 usable, not 256.

What happens with /31 and /32? They're special-cased. A /31 (RFC 3021) is a two-address point-to-point link with no broadcast, so both addresses are usable; a /32 is a single-host route — exactly one address, common in routing tables and cloud host rules.

Does 10.0.5.200/24 mean something different from 10.0.5.0/24? No. Only the prefix length defines the network; the host portion of the input is ignored and normalised to the network address in the output. Handy for pasting a real host address straight from a config.

Can I calculate an IPv6 range here? Not in this tool — it's IPv4-only. IPv6 uses the same CIDR idea but with 128-bit addresses and /0–/128 prefixes, which needs a different calculator.

Supernetting and overlap checks

When you merge several small subnets into one larger block (supernetting), enter the candidate CIDR here and confirm the resulting range covers all the original networks without bleeding into adjacent space. For example, two /25s (10.0.1.0/25 and 10.0.1.128/25) combine cleanly into 10.0.1.0/24 — the tool confirms the broadcast, host range, and total count match what you expect. If the supernet accidentally includes addresses from a neighbouring allocation, the host range in the output makes that visible immediately.

Planning VPC and VLAN address space

Cloud VPCs and on-premises VLANs each need a CIDR block large enough for current hosts plus growth headroom. Enter a candidate prefix here and read the usable-host count. A /24 gives 254 hosts, which sounds generous until you account for load balancers, NAT gateways, reserved IPs, and Kubernetes pod networking. Many teams default to /22 (1,022 usable) or /21 (2,046 usable) for production VPCs so they do not need to resize later — resizing a VPC CIDR in most cloud providers is either painful or impossible once resources are allocated.

Reading firewall and security-group rules

Firewall rules and cloud security groups express source and destination ranges as CIDRs. Paste any rule’s CIDR into this tool to see the exact address span it covers. A rule allowing 10.0.0.0/8 is far broader than 10.0.1.0/24 — the former covers over 16 million addresses while the latter covers 256. Verifying the scope of each rule before deploying prevents accidental over-permissive access that security audits flag later.

Wildcard masks for ACLs

Cisco-style ACLs use wildcard masks (the bitwise inverse of the subnet mask). A /24 subnet mask 255.255.255.0 becomes wildcard 0.0.255.255 for a /16 block. The tool shows the wildcard alongside the mask so you can copy the right value directly into router or switch configuration without manual bit-flipping.