CIDR Calculator

CIDR notation writes a network as an address and a prefix length, such as /26. This calculator finds the smallest block that holds the hosts you need, or converts a prefix to its mask.

Find
Results update as you type.

CIDR prefix

/26

mask 255.255.255.192

Addresses in the block
64
Usable hosts
62
Wildcard mask
0.0.0.63
Blocks of this size in a /24
4

About this calculator

It also shows how many blocks of that size fit in a /24.

How to use it

  1. Choose what to find.
  2. Enter the hosts needed, or the prefix.
  3. Read the result.

The formula

Prefix = 32 − ⌈log₂(hosts + 2)⌉
+ 2
network and broadcast addresses

Worked example

50 hosts

  1. 50 + 2 = 52 needs 6 host bits (64 addresses).
  2. Prefix /26, mask 255.255.255.192, 62 usable hosts; four fit in a /24.

What the result means

Leave room for growth when sizing subnets.

Assumptions

  • IPv4.

Limitations

  • Cloud providers reserve extra addresses in each subnet.

Frequently asked questions

What mask is /26?

255.255.255.192.

How many hosts in a /26?

62 usable.

What prefix for 100 hosts?

/25, with 126 usable.

Last reviewed on 3 October 2026. Found a mistake? Tell us.