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.

For example 192.0.2.77/24. Without a prefix, /32 is assumed.
Prefix/24
Addresses256
Usable hosts254
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.

Common block sizes
PrefixAddressesSubnet maskNumber of /24s
/24256255.255.255.01
/23512255.255.254.02
/221,024255.255.252.04
/212,048255.255.248.08
/204,096255.255.240.016
/198,192255.255.224.032
/1816,384255.255.192.064
/1732,768255.255.128.0128
/1665,536255.255.0.0256

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.