100% Client-Side — Nothing Leaves Your Browser

CIDR Calculator

Enter an IP address with a CIDR prefix to instantly convert it to a subnet mask, calculate the IP range, network address, broadcast address, and usable host count. Browse the full /0 to /32 reference table or plan subnets with the VLSM tool.

/0 (all IPs)/32 (single host)

Results for 192.168.1.0/24

Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
First Usable Host
192.168.1.1
Last Usable Host
192.168.1.254
Usable Hosts
254
Total Addresses
256
IP Class
Class CPrivate
Binary Subnet Mask
11111111 . 11111111 . 11111111 . 00000000
■ Network bits (24)■ Host bits (8)

CIDR Reference Table

CIDRSubnet MaskTotal IPsUsable
/00.0.0.04.3e+94.3e+9
/1128.0.0.02.1e+92.1e+9
/2192.0.0.01.1e+91.1e+9
/3224.0.0.0536,870,912536,870,910
/4240.0.0.0268,435,456268,435,454
/5248.0.0.0134,217,728134,217,726
/6252.0.0.067,108,86467,108,862
/7254.0.0.033,554,43233,554,430
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

Last updated: March 2026

What Is CIDR Notation?

CIDR notation (Classless Inter-Domain Routing) is the standard way to express an IP address and its subnet mask in a single, compact format. Instead of writing 192.168.1.0 mask 255.255.255.0, you write 192.168.1.0/24. The number after the slash is the prefix length — the count of leading 1-bits in the subnet mask.

CIDR was introduced in 1993 to replace the rigid classful addressing system. Before CIDR, networks could only be /8 (Class A, 16 million hosts), /16 (Class B, 65,534 hosts), or /24 (Class C, 254 hosts). This inflexibility led to massive waste and rapid exhaustion of IPv4 addresses. CIDR allows any prefix from /0 to /32, enabling precise allocation.

How CIDR Prefix Lengths Work

An IPv4 address is 32 bits long. The CIDR prefix divides those 32 bits into two parts: network bits (identifying the subnet) and host bits (identifying devices within that subnet). A /24 prefix means 24 network bits and 8 host bits. Each additional bit in the prefix halves the number of available hosts.

The subnet mask is derived directly from the prefix length. A /24 produces a mask of 255.255.255.0 (24 ones followed by 8 zeros in binary). The wildcard mask is the bitwise inverse: 0.0.0.255. The color-coded binary display in this calculator makes this relationship visually clear.

Common CIDR Blocks

The most commonly encountered CIDR blocks are /24 (254 usable hosts, standard for small LANs), /16 (65,534 hosts, medium enterprise), and /8 (16.7 million hosts, the three private ranges). Point-to-point links between routers typically use /30 (2 usable hosts) or /31 (2 hosts, RFC 3021).

Cloud providers like AWS, Azure, and GCP commonly allocate VPCs in /16 blocks and subnets in /24 or /20 blocks. Understanding CIDR is essential for cloud networking, firewall rules, routing tables, and any network design work.

CIDR vs. Subnet Mask: When to Use Which

CIDR notation (/24) and dotted-decimal subnet masks (255.255.255.0) convey the same information in different formats. CIDR is more compact and is the standard in routing protocols, cloud consoles, and documentation. Dotted-decimal masks are used in device configuration (e.g., Windows network settings, some router interfaces). This calculator shows both formats side by side.

Related Tools

Frequently Asked Questions

What is CIDR notation?+
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated network mask. It appends a slash and a number to the IP address (e.g. 10.0.0.0/8). The number indicates how many leading bits of the 32-bit address are the network portion. The remaining bits identify hosts within that network.
How do I convert CIDR to a subnet mask?+
The CIDR number tells you how many 1-bits the subnet mask has, starting from the left. A /24 means 24 ones followed by 8 zeros: 11111111.11111111.11111111.00000000, which in decimal is 255.255.255.0. A /16 is 11111111.11111111.00000000.00000000 = 255.255.0.0. This calculator performs the conversion instantly.
What does /32 mean in CIDR?+
A /32 prefix means all 32 bits are network bits, leaving zero host bits. This identifies exactly one IP address — a single host route. It's commonly used in routing tables to point to a specific device, or in firewall rules to match a single IP.
What is the difference between /24 and /25?+
A /24 gives you 256 total addresses (254 usable hosts) with a subnet mask of 255.255.255.0. A /25 splits that in half: 128 total addresses (126 usable) with a mask of 255.255.255.128. Going from /24 to /25 doubles the number of subnets but halves the hosts per subnet.
Why was CIDR introduced?+
Before CIDR (introduced in 1993 via RFC 1517-1520), the internet used classful addressing with only three network sizes: Class A (/8), Class B (/16), and Class C (/24). This was extremely wasteful — organizations needing 500 addresses had to get a Class B with 65,534 addresses. CIDR allows any prefix length, enabling efficient allocation and dramatically slowing IPv4 exhaustion.
How do I calculate how many hosts a CIDR prefix supports?+
The formula is 2^(32 - prefix) - 2 for usable hosts. The subtraction of 2 accounts for the network address (all host bits 0) and broadcast address (all host bits 1), which cannot be assigned to devices. For example, /24 gives 2^8 - 2 = 254 usable hosts. The exceptions are /31 (2 hosts, RFC 3021) and /32 (1 host route).