Free tool
IPv4 subnet and CIDR calculator
Type an address with its prefix to get the network, host range, mask and size. Split a block into smaller subnets, or turn a start and end address into CIDR blocks.
- Network address
- 192.0.2.0/24
- Usable host range
- 192.0.2.1 to 192.0.2.254
- Broadcast address
- 192.0.2.255
- Total addresses
- 256
- Usable hosts
- 254
- Subnet mask
- 255.255.255.0
- Wildcard (ACL) mask
- 0.0.0.255
- Binary mask
- 11111111.11111111.11111111.00000000
- Equivalent /24 blocks
- 1
- Reverse DNS zone
- 2.0.192.in-addr.arpa
- Address type
- Documentation (TEST-NET-1)
A /24 is the smallest block most networks accept in global BGP routing, which is why it is the most traded size.
Convert an address range to CIDR blocks
- 192.0.2.10/31
- 192.0.2.12/30
- 192.0.2.16/28
- 192.0.2.32/27
- 192.0.2.64/26
- 192.0.2.128/26
- 192.0.2.192/29
- 192.0.2.200/32
191 addresses in 8 blocks. Start: 192.0.2.10.
Reading CIDR notation
The number after the slash is the prefix length: how many of the 32 bits identify the network. The rest identify hosts. Each step shorter doubles the block: a /24 has 256 addresses, a /23 has 512, a /22 has 1,024, and a /16 has 65,536.
| Prefix | Addresses | Subnet mask | Number of /24s |
|---|---|---|---|
| /24 | 256 | 255.255.255.0 | 1 |
| /23 | 512 | 255.255.254.0 | 2 |
| /22 | 1,024 | 255.255.252.0 | 4 |
| /21 | 2,048 | 255.255.248.0 | 8 |
| /20 | 4,096 | 255.255.240.0 | 16 |
| /19 | 8,192 | 255.255.224.0 | 32 |
| /18 | 16,384 | 255.255.192.0 | 64 |
| /17 | 32,768 | 255.255.128.0 | 128 |
| /16 | 65,536 | 255.255.0.0 | 256 |
Sizing what you need before you buy or lease
Count the public addresses you need now and in the next two years, then round up to the next block size. Registries look at how you will use the space when they approve a transfer, and blocks that are not aligned on their boundary (for example 192.0.2.128/24) do not exist. The calculator shows the aligned network for any address you type.
Need a block? See buying IPv4 or leasing IPv4, or browse the marketplace.
Questions about this tool
How many usable addresses are in a /24?
A /24 has 256 addresses. On an ordinary LAN, 254 are usable for hosts because the first is the network address and the last is the broadcast address. When the block is routed to you and split further, how many are usable depends on how you subnet it.
Why is /24 the smallest block I can buy for the internet?
Most networks filter BGP announcements longer than /24, so a smaller prefix would not be reachable everywhere. That is why /24 is the minimum transfer size in practice and the most traded size.
What is a wildcard mask?
It is the inverse of the subnet mask (255.255.255.0 becomes 0.0.0.255). Some router access lists and OSPF configurations use it instead of the mask.
Does a /31 have a broadcast address?
No. RFC 3021 allows /31 on point-to-point links, where both addresses are usable. A /32 is a single host.
Is what I type sent anywhere?
No. The calculator runs entirely in your browser.
More free tools
Need a block, or selling one?
Talk to a broker. Valuations are free and every cost is in writing before you sign.