CIDR & subnet calculator
Work out the network, mask, host range and size of any IPv4 CIDR block, and split it into subnets.
How it works
The prefix length says how many leading bits are the network. The remaining bits number the hosts: a /24 has 256 addresses, of which 254 are usable.
addresses = 2^(32 − prefix)Questions
Why are two addresses not usable?
The first is the network address and the last is the broadcast address. /31 and /32 are special cases with no reserved addresses.
How do cloud VPCs differ?
AWS, Azure and Google Cloud reserve a few more addresses in each subnet, usually four or five.