Home / Network tools / CIDR calculator

CIDR Calculator

Enter an IP address with a prefix length, such as 192.168.1.0/24, and see the network, mask, range and number of hosts. Works for IPv4 and IPv6.

Details

Subnets

Enter a longer prefix above to split the block.

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:

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242

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.

Frequently asked questions

What does /24 mean in an IP address?

It means the first 24 bits are the network part. The subnet mask is 255.255.255.0 and the block holds 256 addresses.

How many hosts are in a /24?

254 usable hosts. The block has 256 addresses, and the first (network) and last (broadcast) are not given to hosts.

Does the calculator support IPv6?

Yes. Enter an IPv6 prefix such as 2001:db8::/32 to see the first address, the last address and the size of the block.

Is my data sent to a server?

No. All the calculations run in your browser.