CIDR Calculator

Explore how CIDR prefix lengths map to subnet masks, usable host counts, and IPv4 network ranges.

CIDR to Subnet Mask

Enter any IPv4 CIDR notation to see the corresponding subnet mask and host capacity.

CIDR Prefix Lengths Explained

In CIDR notation, the number after the slash (/) represents how many bits of the address are fixed as the network portion. For example, /24 means the first 24 bits are the network, leaving 8 bits for hosts.

Smaller prefixes (such as /16) cover larger networks with more hosts, while larger prefixes (such as /30) represent tiny networks with only a few usable addresses.

Planning Address Space with CIDR

  • Choose smaller subnets for point-to-point links and infrastructure, such as /30 or /31.
  • Use /24 or similar ranges for LAN segments, keeping broadcast domains manageable.
  • Aggregate adjacent prefixes whenever possible to keep routing tables smaller and easier to read.