CIDR Calculator

Calculate CIDR notation, network address, broadcast address, and usable host range from IP address and subnet mask.

CIDR Notation

/24

192.168.1.0/24

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

First Usable Host

192.168.1.1

Last Usable Host

192.168.1.254

Usable Hosts

254

Total Networks

256

How to Use This Calculator

  1. Enter the IP address (e.g., 192.168.1.0).
  2. Enter the subnet mask (e.g., 255.255.255.0).
  3. The calculator displays CIDR notation, network address, broadcast address, and usable host range.
  4. Use this to understand network configuration, plan subnets, or troubleshoot networking issues.

CIDR Calculation

CIDR notation and network information are calculated from IP and subnet mask:

CIDR = Number of 1s in subnet mask
Host Bits = 32 - CIDR
Usable Hosts = 2^(Host Bits) - 2
Network Address = IP AND Subnet Mask
Broadcast Address = IP OR (NOT Subnet Mask)

Example: 192.168.1.0 with 255.255.255.0: CIDR = /24 (24 ones in mask), Host bits = 8, Usable hosts = 2^8 - 2 = 254. Network = 192.168.1.0, Broadcast = 192.168.1.255, Usable range = 192.168.1.1 to 192.168.1.254.

Full Description

CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing IP packets. CIDR notation represents IP addresses and subnet masks in a compact format: IP/prefix, where the prefix is the number of network bits. This replaced the older classful addressing system and allows for more flexible subnetting.

Understanding CIDR is essential for network design, subnet planning, and IP address management. The CIDR prefix determines how many bits are used for the network portion, with the remaining bits used for host addresses. A /24 network has 24 network bits and 8 host bits, providing 256 addresses (254 usable after excluding network and broadcast addresses). Smaller prefixes (like /16) create larger networks, while larger prefixes (like /28) create smaller networks.

This calculator helps you understand CIDR notation and calculate network information. Enter an IP address and subnet mask, and it shows the CIDR notation, network address, broadcast address, usable host range, and number of hosts. Use it when designing networks, planning subnets, understanding routing, or troubleshooting network configuration. CIDR is fundamental to modern IP networking.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation represents IP addresses and subnet masks in a compact format: IP/prefix. For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits for hosts (256 addresses, 254 usable).

How do I convert subnet mask to CIDR?

Count the number of 1s in the subnet mask binary representation. For example, 255.255.255.0 = 11111111.11111111.11111111.00000000 = 24 ones = /24. The calculator does this automatically.

What is the network address?

The network address is the first address in a subnet, where all host bits are 0. It identifies the network itself and cannot be assigned to a host. For 192.168.1.0/24, the network address is 192.168.1.0.

What is the broadcast address?

The broadcast address is the last address in a subnet, where all host bits are 1. It's used to send packets to all hosts on the network. For 192.168.1.0/24, the broadcast address is 192.168.1.255. It cannot be assigned to a host.