CIDR and Subnet Calculator
Enter an IPv4 CIDR block or an IP with a subnet mask to get the network address, broadcast address, subnet mask and usable host range.
Enter an IPv4 CIDR block or an IP with a subnet mask to get the network address, broadcast address, subnet mask and usable host range.
CIDR notation, like 192.168.1.0/24, describes a block of IP addresses. The number after the slash says how many leading bits belong to the network.
Enter a CIDR block, or an address with a subnet mask, to see the network and broadcast addresses, the mask, and the range of usable hosts.
192.168.1.77/24 Network 192.168.1.0 Broadcast 192.168.1.255 Hosts 192.168.1.1 - 192.168.1.254
CIDR notation, introduced by RFC 4632, replaced the old class A, B and C system with variable length prefixes. An IPv4 address has 32 bits, and a prefix of /n reserves the first n bits for the network. The remaining 32 minus n bits identify hosts, giving two to the power of that number addresses. A /24 leaves 8 host bits, so 256 addresses, and a /26 leaves 6 bits, so 64. The subnet mask is simply n ones followed by zeros, and the wildcard mask, used by some routers and access lists, is its bitwise inverse.
To find the network address, apply a bitwise AND between the address and the mask. The broadcast address sets all host bits to one. For 10.1.5.130/26, the block size is 64, so subnets start at 0, 64, 128 and 192 in the last octet, which puts that address in 10.1.5.128 with broadcast 10.1.5.191. Usable hosts run from .129 to .190, which is 62 addresses. Special cases exist: RFC 3021 allows /31 point to point links to use both addresses, and /32 describes one host. Cloud providers often reserve additional addresses in each subnet, so check their rules.
The network and broadcast addresses are reserved, so a /24 has 256 addresses but 254 usable hosts.
A /31 has two usable addresses (point-to-point links) and a /32 is a single host.
No. This tool handles IPv4 only.
No. The calculation runs in your browser.
A /22 leaves 10 host bits, so 1024 addresses in total and 1022 usable hosts in a conventional subnet. It spans four consecutive /24 blocks.
The maths is identical. The private ranges from RFC 1918 are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, and they are simply blocks that are not routed on the public internet.