Technology calculators

CIDR Calculator

Updated Sep 29, 2026 By Infinity Calculator
Enter an IPv4 address with prefix length, e.g. 10.0.0.0/8

CIDR Calculation Results
IP Address —
Network Address —
Broadcast Address —
Subnet Mask —
Wildcard Mask —
CIDR Notation —
Prefix Length —
IP Class —
IP Type —
Total Addresses —
Usable Host Addresses —
Usable Host Range —
Integer / Hex ID —
Binary Representation
Legend: ■ Network bits | ■ Host bits
IP Address —
Subnet Mask —
Network Address —
Broadcast Address —
CIDR Quick Reference Table
CIDR Subnet Mask Wildcard Mask Total Addresses Usable Hosts

Introduction

The CIDR Calculator helps you quickly work out network details from a CIDR notation address. CIDR stands for Classless Inter-Domain Routing.1 It is a way to describe a range of IP addresses using a single address and a prefix length, like 192.168.1.0/24. This tool takes that input and gives you useful information such as the network address, broadcast address, subnet mask, number of usable hosts, and the full range of IP addresses in the block. This calculator handles the subnet math so you can focus on building your network right.

How to Use Our CIDR Calculator

Enter an IP address and a CIDR prefix length to calculate your network address, broadcast address, subnet mask, total hosts, and usable host range.

IP Address: Type in the IP address you want to analyze. This is the base address of the network or any host address within it. It should be in standard IPv4 format, such as 192.168.1.0.

CIDR Prefix Length: Enter the prefix length, which is the number after the slash (/) in CIDR notation. This value ranges from 0 to 32 and tells the calculator how many bits are used for the network portion of the address.1 For example, a /24 prefix means the first 24 bits define the network, leaving 8 bits for host addresses.

Understanding CIDR Notation

CIDR stands for Classless Inter-Domain Routing. It is a method used to assign and organize IP addresses on a network. Before CIDR, networks came in three fixed sizes, called Class A, B, and C.1 A Class C network allowed at most 254 hosts, which was too small for many organizations, while a Class B network allowed up to 65,534, which was too large for most, so Class B addresses were running out.1 CIDR replaced the classes with blocks that can be any power-of-two size.1 It was first proposed in 1992 and set out in RFC 1519 in September 1993.1

How CIDR Works

A CIDR address looks like a normal IP address with a slash and a number at the end. For example: 192.168.1.0/24. The number after the slash is called the prefix length. It tells you how many bits of the address are used for the network part. The remaining bits are used for individual devices (called hosts) on that network.

The prefix length can range from /0 to /32 for IPv4 addresses.1 A smaller prefix number means a bigger network with more available host addresses. A larger prefix number means a smaller network with fewer hosts. For example, a /24 network has 256 total addresses (254 usable for hosts), while a /16 network has 65,536 total addresses.1 Different prefix lengths also determine how a network is divided into smaller subnets.

Key Terms to Know

  • Network Address: The first address in a CIDR block. It identifies the network itself.5
  • Broadcast Address: The last address in a CIDR block. It is used to send data to all devices on the network.2
  • Subnet Mask: A 32-bit number that separates the network part of an address from the host part.3 For a /24 network, the subnet mask is 255.255.255.0.
  • Usable Hosts: The total number of addresses minus two (the network address and the broadcast address).2
  • Wildcard Mask: The inverse of the subnet mask.8 It is often used in router access control lists (ACLs).8

Why CIDR Matters

CIDR is important because it keeps the internet running efficiently. It slows the growth of internet routing tables and the rate at which IPv4 addresses are used up.1 Network administrators use CIDR every day to plan subnets, set up firewalls, and configure routers. Understanding CIDR notation is a core networking skill.


Formulas used

Subnet Mask from Prefix 1
M = (2^{32} - 1) \ll (32 - p)
Wildcard Mask
W = \lnot M
Network Address 3
N = \text{IP} \;\&\; M
Broadcast Address 2
B = N \;|\; W
Total Addresses 1
T = 2^{32-p}
Usable Hosts (p < 31) 2
U = 2^{32-p} - 2
First Usable Host 2
H_{\min} = N + 1
Last Usable Host 2
H_{\max} = B - 1

Frequently asked questions

What does the /24 mean in an IP address like 192.168.1.0/24?

The /24 is the prefix length. It means the first 24 bits of the 32-bit IP address are used for the network part.1 The remaining 8 bits are for host devices. A /24 gives you 256 total addresses and 254 usable host addresses.1

What is the difference between total addresses and usable hosts?

Total addresses is every IP in the block. Usable hosts is that number minus two.2 The first address is the network address and the last address is the broadcast address. Neither can be assigned to a device.2 For example, a /24 block has 256 total addresses but only 254 usable hosts.1

What is a wildcard mask and when do I need it?

A wildcard mask is the opposite of a subnet mask.8 Where the subnet mask has a 1, the wildcard mask has a 0, and vice versa. For a /24 network, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255.8 Wildcard masks are used in router configurations, especially in access control lists (ACLs) on Cisco routers.8

What is the difference between a network address and a broadcast address?

The network address is the first IP in a CIDR block. It identifies the network itself and cannot be assigned to a device.2 The broadcast address is the last IP in the block. It is used to send data to every device on that network at once.2 Neither address can be used as a regular host address.

What are IP classes A, B, C, D, and E?

IP classes are the old way of grouping IP addresses before CIDR was created:

  • Class A: 0.0.0.0 to 127.255.255.255 (very large networks).
  • Class B: 128.0.0.0 to 191.255.255.255 (medium networks).
  • Class C: 192.0.0.0 to 223.255.255.255 (small networks).
  • Class D: 224.0.0.0 to 239.255.255.255 (multicast).
  • Class E: 240.0.0.0 to 255.255.255.255 (reserved).

The class comes from the first bits of the address: class A addresses start with a 0 bit, class B with 10, and class C with 110.6 Class D addresses start with 1110 and are used for multicast, and class E addresses start with 1111 and are reserved.7 This calculator shows the IP class for your address, but the class system has been deprecated in favor of CIDR.1

What does Private (RFC 1918) mean in the IP Type result?

RFC 1918 defines three ranges of IP addresses set aside for private networks.4 These addresses are not routed on the public internet.4 They are:

  • 10.0.0.0 to 10.255.255.255
  • 172.16.0.0 to 172.31.255.255
  • 192.168.0.0 to 192.168.255.255

If your IP falls in one of these ranges, the calculator labels it as Private (RFC 1918).

What is a /31 or /32 network used for?

A /32 network has just one address.1 It is used to identify a single host, often in routing tables or firewall rules. A /31 network has two addresses and is used for point-to-point links between two routers.5 Since there are only two devices, no network or broadcast address is needed, so both addresses are usable.5

What do the colored binary bits mean in the results?

The binary section uses two colors to show which bits belong to the network part and which belong to the host part. Blue bits are the network bits (set by the prefix length). Red bits are the host bits. This helps you see exactly where the network and host portions divide in the address.

How do I figure out how many subnets I can create from a larger network?

Divide the larger network into smaller ones by increasing the prefix length. Each extra bit in the prefix doubles the number of subnets. For example, splitting a /24 into /26 subnets gives you 4 subnets (2 extra bits = 2² = 4), each with 64 total addresses and 62 usable hosts.

What is the Integer / Hex ID in the results?

The Integer ID is your IP address written as a single whole number instead of four octets. The Hex ID is the same value in hexadecimal (base-16) format. These are useful for programmers and low-level network tools that store IP addresses as numbers rather than dotted-decimal strings.

What is a common CIDR block for a home network?

Many home routers use 192.168.1.0/24 or 192.168.0.0/24. This gives you 254 usable host addresses, which is more than enough for home devices like phones, computers, smart TVs, and other gadgets.


Sources

  1. Fuller V, Li T. Classless Inter-domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan (RFC 4632). Internet Engineering Task Force. 2006;§ 2 History; § 3 Classless Addressing; § 3.1 Prefix Notation (prefix table); § 14.2 references. Accessed September 29, 2026.
  2. Braden R, ed.. Requirements for Internet Hosts -- Communication Layers (RFC 1122). Internet Engineering Task Force. 1989;§ 3.2.1.3 Addressing; § 3.3.6 Broadcasts. Accessed September 29, 2026.
  3. Mogul J, Postel J. Internet Standard Subnetting Procedure (RFC 950). Internet Engineering Task Force. 1985;§ 2.1 Interpretation of Internet Addresses; § 2.2 Changes to Host Software to Support Subnets. Accessed September 29, 2026.
  4. Rekhter Y, Moskowitz B, Karrenberg D, de Groot GJ, Lear E. Address Allocation for Private Internets (RFC 1918). Internet Engineering Task Force. 1996;§ 3 Private Address Space. Accessed September 29, 2026.
  5. Retana A, White R, Fuller V, McPherson D. Using 31-Bit Prefixes on IPv4 Point-to-Point Links (RFC 3021). Internet Engineering Task Force. 2000;§ 1 Introduction; § 2.1 Addressing; § 2.2 Broadcast and Network Addresses. Accessed September 29, 2026.
  6. Postel J, ed.. Internet Protocol (RFC 791). Internet Engineering Task Force. 1981;§ 2.3 Addressing. Accessed September 29, 2026.
  7. Deering S. Host Extensions for IP Multicasting (RFC 1112). Internet Engineering Task Force. 1989;§ 4 Host Group Addresses. Accessed September 29, 2026.
  8. Configure IP Access Lists. Cisco Systems. 2025;ACL Basics: wildcard (inverse) masks. Accessed September 29, 2026.