CIDR calculator
Enter a CIDR block such as 10.0.0.0/16 or 2001:db8::/32 to see its range, mask and size.
tool 11 of 12 []
all shortcuts ?
Is an IP inside this block?
Split into smaller subnets
How to use it
- Type an address and prefix length. The address does not have to be the network address; 192.168.10.77/26 is normalised to the block 192.168.10.64/26 and the tool tells you so.
- For IPv4 you get the netmask, wildcard mask, network and broadcast addresses, first and last usable host and the usable host count. /31 and /32 follow the usual point-to-point and single-host rules.
- IPv6 blocks show the network, last address and total address count. IPv6 has no broadcast address.
- Use the membership check to test whether one address falls inside the block, and Split to list the subnets of a longer prefix.
Examples
Select an example to load it into the tool.
- /24 LAN
192.168.1.0/24 - Private 10/8
10.0.0.0/8 - AWS style VPC /16
172.31.0.0/16 - IPv6 /48
2001:db8:abcd::/48 - Point-to-point /31
10.1.1.4/31
Frequently asked questions
How many usable hosts does a /24 have?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, which are not assigned to hosts. The formula is 2^(32 - prefix) minus 2.
Why does a /31 or /32 not follow that formula?
A /31 has two addresses and RFC 3021 allows both to be used on point-to-point links. A /32 is a single host address, as used for loopbacks and host routes.
What is a wildcard mask?
The bitwise inverse of the netmask. Cisco ACLs and OSPF network statements use it: a /24 netmask 255.255.255.0 becomes wildcard 0.0.0.255.
Does it support IPv6?
Yes. It parses abbreviated forms (::), IPv4-mapped tails and prints results in compressed RFC 5952 form. Counts use exact big-integer arithmetic, so a /32 correctly shows 79228162514264337593543950336 addresses.
Are cloud providers different?
Many clouds reserve extra addresses in each subnet. AWS, for instance, reserves five in every subnet, so usable hosts are fewer than this tool shows. Check your provider's documentation.