CIDR calculator

Decodes CIDR notation such as 10.0.0.0/8: the range it covers, its mask and how many addresses it contains.

For example 10.0.0.0/8

CIDR notation
172.16.0.0/12
First address
172.16.0.0
Last address
172.31.255.255
Subnet mask
255.240.0.0
Wildcard mask
0.15.255.255
Total addresses
1,048,576
Usable hosts
1,048,574
Prefix length
/12
IPv4 CIDR reference table
PrefixSubnet maskAddresses
/32255.255.255.2551
/31255.255.255.2542
/30255.255.255.2524
/29255.255.255.2488
/28255.255.255.24016
/27255.255.255.22432
/26255.255.255.19264
/25255.255.255.128128
/24255.255.255.0256
/23255.255.254.0512
/22255.255.252.01,024
/21255.255.248.02,048
/20255.255.240.04,096
/19255.255.224.08,192
/18255.255.192.016,384
/17255.255.128.032,768
/16255.255.0.065,536
/15255.254.0.0131,072
/14255.252.0.0262,144
/13255.248.0.0524,288
/12255.240.0.01,048,576
/11255.224.0.02,097,152
/10255.192.0.04,194,304
/9255.128.0.08,388,608
/8255.0.0.016,777,216
/7254.0.0.033,554,432
/6252.0.0.067,108,864
/5248.0.0.0134,217,728
/4240.0.0.0268,435,456
/3224.0.0.0536,870,912
/2192.0.0.01,073,741,824
/1128.0.0.02,147,483,648
/00.0.0.04,294,967,296

Runs in your browser. Nothing you enter is sent to our server.

About this tool

CIDR (Classless Inter-Domain Routing) writes a network as address/prefix. It replaced the old class A, B and C networks and lets you split address space into blocks of any size, from a single address (/32) to the whole of IPv4 (/0).

If the address you enter is not the start of its block (say 10.1.2.3/8), the calculator shows the canonical network, 10.0.0.0/8. A reference table of all 33 prefixes follows below.

How to use

  1. Enter a block in CIDR form, such as 172.16.0.0/12, or type an address and pick a prefix.
  2. Read the canonical notation, the range boundaries and the address count.
  3. Use the prefix table below to size a new block quickly.

Examples

Input
172.16.0.0/12
Result
Range 172.16.0.0 – 172.31.255.255, mask 255.240.0.0, 1,048,576 addresses
Input
10.1.2.3/8
Result
Canonical block 10.0.0.0/8, 16,777,216 addresses

Frequently asked questions

What does the number after the slash mean?

How many leading bits of the address belong to the network. The remaining bits number the addresses in the block: a /20 has 12 of them, so 2¹² = 4096 addresses.

What are /0 and /32?

/0 is the entire IPv4 space, 4,294,967,296 addresses, and is how the default route is written. /32 is exactly one address, handy for firewall rules.

Why is CIDR better than network classes?

Classes only offered /8, /16 and /24 blocks. With CIDR you can allocate, for example, a /22 with 1024 addresses and waste far less space.