CIDR Subnet Calculator
Compute IPv4 subnets from CIDR notation. Network, broadcast, mask, host range, and binary view.
Enter input above to see the result.
What is this for?
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.
When to use it
- 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.
How it works
- 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.
Common gotchas
- 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.
Quick reference
- /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).