What a CIDR calculator does
A CIDR block is an IP address followed by a slash and a number, such as 192.168.1.0/24. The number says how many of the leading bits identify the network. This calculator turns that short form into everything you usually need: the network address, the subnet mask, the wildcard mask, the broadcast address, the first and last usable host, and how many addresses the block holds.
192.168.1.0/24
Network address 192.168.1.0
Subnet mask 255.255.255.0
Broadcast 192.168.1.255
Usable hosts 192.168.1.1 to 192.168.1.254 (254 hosts)
How to read the notation
An IPv4 address has 32 bits. In 192.168.1.0/24, the first 24 bits are the network part and the last 8 bits are the host part. The block holds 2 to the power of 8, which is 256 addresses. Each step in the prefix halves or doubles the size:
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Usable hosts
In a normal IPv4 subnet the first address is the network address and the last is the broadcast address, so two addresses cannot be given to hosts. A /31 is the exception and has two usable addresses for point to point links, and a /32 is a single address. Some cloud platforms reserve more: Amazon VPC, for example, keeps five addresses in every subnet, so check your provider rules.
What you can type
- CIDR notation: 10.0.0.0/8 or 2001:db8::/32
- An address with a mask after the slash: 172.16.5.4/255.255.0.0
- An address and a mask separated by a space: 10.1.2.3 255.255.255.0
- A wildcard mask in place of a subnet mask: 10.1.2.3/0.0.0.255
- A single address with no prefix, which is treated as /32 for IPv4 or /128 for IPv6
If the address has bits set in the host part, such as 192.168.1.77/24, the tool shows the network address that the block starts at and tells you so.
Splitting a block into subnets
Type a longer prefix in the Split into box, for example 26 for a /24 block. The tool lists the smaller subnets with their first and last addresses, up to 256 rows. It is a quick way to plan how to divide a network between teams, floors or VLANs.
IPv6
IPv6 has no broadcast address, so the tool shows the first and last address of the block. The counts are huge, so they are shown as a power of 2 with the full number beside it. A /64 is the usual size for one network.
For a single conversion, see CIDR to subnet mask, subnet mask to CIDR or CIDR to IP range. New to the idea? Read what is CIDR.