CIDR Subnet Calculator
Compute IPv4 subnets from CIDR notation. Network, broadcast, mask, host range, and binary view.
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
- Designing a new VLAN or VPC subnet and determining whether a /22 (1022 usable hosts) or /23 (510 usable hosts) is right for your requirements.
- Reading firewall rules, security group policies, or ACLs that use CIDR notation—e.g.,
allow 10.42.0.0/16—and confirming the exact range of traffic they cover. - Subnetting a larger network (like splitting a /24 into /25 or /26) and verifying that address boundaries don't overlap.
- Validating cloud infrastructure rules (AWS security groups, Azure NSGs, GCP firewall rules) before deployment to catch misconfigurations.
- Converting between CIDR notation and legacy dotted-decimal subnet masks when integrating with older routers or documentation.
- Troubleshooting network connectivity issues by confirming whether two hosts are on the same subnet.
Network vs host bits
- Enter a CIDR. Paste any valid IPv4 CIDR (e.g.,
10.0.0.0/16,172.16.5.0/24, or even192.168.1.42/25—the host bits are ignored). - The prefix length determines the subnet mask. A /24 means the first 24 bits define the network, the remaining 8 bits address individual hosts. The tool converts this into dotted-decimal form (
255.255.255.0). - The network address is calculated. The tool zeros out all host bits, giving you the canonical network address (e.g.,
10.0.0.0for10.0.5.200/16). - Broadcast and host range are derived. The broadcast address sets all host bits to 1. Usable hosts fall between network + 1 and broadcast − 1 (except for /31 and /32, which follow RFC 3021 rules).
- Binary representation is shown. See the network address, mask, and broadcast in binary to understand the bit-level structure.
Edge cases and miscounting traps
- Usable addresses exclude network and broadcast. A /24 contains 256 total addresses, but only 254 are assignable to hosts: the first address (.0) is the network identifier, and the last (.255) is broadcast. Neither can be given to a device.
- /31 and /32 are special cases. A /31 (RFC 3021) is a point-to-point link with 2 usable addresses and no broadcast. A /32 is a single host route and represents exactly one address—common in routing tables and host routes on cloud platforms.
- Host bits in the input are ignored.
10.5.7.42/24and10.5.7.0/24refer to the same network; the prefix length is what matters. This tool normalises to the proper network address in its output. - RFC 1918 private ranges are not special here. The calculator treats
10.0.0.0/8,172.16.0.0/12, and192.168.0.0/16the same as public ranges. Use your own judgment about what's routable in your infrastructure. - IPv6 is not supported. CIDR notation works for IPv6 too, but with a /0 to /128 prefix range and 128-bit addresses. This tool is IPv4-only.
Prefix lengths at a glance
- /32 — 1 address (a host route).
- /30 — 4 addresses, 2 usable (point-to-point WAN links).
- /24 — 256 addresses, 254 usable (typical LAN or Class C equivalent).
- /16 — 65,536 addresses (site network, VPC, Class B equivalent).
- /8 — 16,777,216 addresses (organisation-wide, Class A equivalent).
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.