Back to Utilities

IP / CIDR Calculator

Calculate network, broadcast, mask, and host ranges for any IPv4 CIDR block.

Advertisement
Loading...

What this tool does

CIDR (Classless Inter-Domain Routing) notation is a compact way to represent IP address ranges and subnet masks. An IPv4 CIDR block like 192.168.1.0/24 represents all 256 addresses from 192.168.1.0 to 192.168.1.255, with the /24 indicating that the first 24 bits are the network prefix. This tool calculates the network address, broadcast address, usable host range, total addresses, and subnet mask for any CIDR block.

CIDR replaced the older classful networking (Class A, B, C) because it allows variable-length subnet masks, which are essential for efficient IP address allocation. A /30 subnet has only 2 usable hosts (perfect for a point-to-point link), while a /16 has 65,534 usable hosts (suitable for a large corporate network).

Usage Example

// Common CIDR blocks
/30  = 4 total, 2 usable   (point-to-point link)
/29  = 8 total, 6 usable   (small office)
/24  = 256 total, 254 usable (typical LAN)
/16  = 65,536 total, 65,534 usable (large network)
/8   = 16,777,216 total (huge network, very rare)
/0   = 4,294,967,296 total (entire IPv4 space)

// 10.0.0.0/24 breakdown
Network:       10.0.0.0
Subnet mask:   255.255.255.0
First host:    10.0.0.1
Last host:     10.0.0.254
Broadcast:     10.0.0.255
Total hosts:   256 (254 usable)

Common Edge Cases

  • The network address (all host bits = 0) and broadcast address (all host bits = 1) are reserved, so a /30 has only 2 usable hosts out of 4 total. Do not assign these to devices.
  • A /31 subnet is a special case in RFC 3021, with both addresses usable for point-to-point links. A /32 represents a single host, used for loopback or specific host routes.
  • Private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the public internet. They are used internally within organizations and translated via NAT for external access.
  • IPv4 address space is exhausted. New deployments increasingly use IPv6, which has 128-bit addresses and a very different CIDR scheme (e.g., 2001:db8::/32).
  • Subnet calculators may differ on whether to include the network and broadcast addresses as usable. The modern convention is to exclude them, but some legacy systems count them.

FAQ

What is the difference between /24 and 255.255.255.0?
They are the same thing. The /24 notation is a shortcut for the subnet mask 255.255.255.0, indicating 24 bits of network prefix. CIDR notation is preferred because it is shorter and applies to both IPv4 and IPv6.
How many subnets can I create from a /16?
A /16 can be divided into 256 /24 subnets, 512 /25 subnets, 1024 /26 subnets, and so on. Each time you add 1 to the prefix length, you halve the host space and double the number of subnets.
What is the largest usable subnet for a network of 1000 hosts?
You need at least 10 host bits (2^10 - 2 = 1022 usable hosts), so a /22 (255.255.252.0) is the smallest subnet that fits. A /23 (510 usable) would be too small, and a /21 (2046 usable) provides more room for growth.
Advertisement