CIDR / Subnet Calculator

Map a CIDR block to its full IP scope.

Enter an IPv4 network in CIDR notation. Returns the network and broadcast addresses, the usable host range, host counts, netmask and wildcard mask — plus a bit-by-bit view of where the network boundary falls.

calc — cidr-scope
/
IPv4 in CIDR notation · prefix /0 to /32 · /31 and /32 handled per RFC 3021
192.168.1.0/24
10.0.0.0/8
172.16.5.0/22
203.0.113.0/29
198.51.100.7/31
Invalid input
Network
Network address
Broadcast address
First usable host
Last usable host
Usable hosts
Total addresses
Subnet mask
Wildcard mask
Bit boundary · 32-bit address
network bits · prefix
host bits
ADVERTISEMENT · 728×90 SLOT — DROP YOUR ADSENSE UNIT HERE
How it works

A CIDR block like 192.168.1.0/24 describes a contiguous range of IP addresses. The number after the slash — the prefix length — is how many leading bits of the 32-bit address are fixed as the network portion. The remaining bits are the host portion, free to vary, and they define how many addresses the block contains.

Network, broadcast, and the usable range

Setting every host bit to 0 gives the network address. Setting every host bit to 1 gives the broadcast address. In a normal subnet those two are reserved, so the usable host range runs from network+1 to broadcast−1. That's why a /24 holds 256 addresses but only 254 usable hosts.

Two special cases

A /31 has no room for separate network and broadcast addresses, so RFC 3021 defines both as usable — exactly two hosts, ideal for point-to-point links. A /32 is a single host route. This calculator handles both rather than reporting "0 usable hosts."

Subnet mask vs. wildcard mask

The subnet mask is the prefix written as dotted decimal — /24 is 255.255.255.0. The wildcard mask is its bitwise inverse (0.0.0.255) and is what you use in Cisco ACLs and OSPF, where a 1 bit means "don't care."

Prefix reference

PrefixSubnet maskAddressesUsable hosts
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/24255.255.255.0256254
/22255.255.252.01,0241,022
/16255.255.0.065,53665,534
/8255.0.0.016,777,21616,777,214

Private ranges (RFC 1918)

Three ranges are reserved for private use and won't route on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. This calculator flags whether your block is private, public, or special-use.

FAQ
Why does /24 give 254 hosts instead of 256?

A /24 contains 256 addresses, but the first (network) and last (broadcast) are reserved, leaving 254 assignable to hosts.

What's the difference between subnet mask and wildcard mask?

They're bitwise inverses. The subnet mask marks network bits with 1s (255.255.255.0); the wildcard mask marks "don't care" bits with 1s (0.0.0.255) and is used in ACLs and OSPF.

Can I enter a host address instead of the network address?

Yes. Enter 192.168.1.77/24 and the calculator derives the correct network (192.168.1.0/24) by masking off the host bits.

Does it support IPv6?

Not yet — this tool is IPv4. An IPv6 prefix calculator is a planned companion tool.