CIDR Calculator

CIDR to range, and range to CIDR. The result updates as you type.

Network address
10.0.0.0
Broadcast address
10.0.3.255
First host
10.0.0.1
Last host
10.0.3.254
Subnet mask
255.255.252.0
Wildcard mask
0.0.3.255
Address count
1,024
Usable hosts
1,022
CIDR
10.0.0.0/22
network bitshost bits
How this calculator works

CIDR to range clears the host bits to find the network address, then sets them to find the broadcast address. The mask is the network bits as an address. The wildcard is the inverse of the mask. Usable hosts are the address count minus 2, except a /31 (two addresses, RFC 3021) and a /32 (one address). Range to CIDR walks the span and emits the largest aligned power-of-two block that still fits, then repeats. The math runs in your browser. IPv6 ranges are on the IP range to CIDR page. A link such as /cidr/10.0.0.0/22 opens that block.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation is an IPv4 or IPv6 address, a slash, and a prefix length. 192.168.1.0/24 means the first 24 bits are the network. That block has 256 addresses, from 192.168.1.0 through 192.168.1.255.

How do I turn an IP range into CIDR?

Enter the first and last IPv4 address. One CIDR block can only describe a power-of-two sized range that starts on a matching boundary, so an arbitrary range is split into the fewest such blocks that cover it exactly. This page does that for IPv4. IPv6 ranges are on the IP range to CIDR page.

How many addresses are in a /24?

A /24 has 256 addresses. Usable hosts are 254 when the network and broadcast addresses are reserved. A /31 has 2 addresses and no separate broadcast (RFC 3021). A /32 is a single address.