Subnet/CIDR Calculator

Calculate network address, broadcast address, usable hosts and more from any IP/CIDR input.

How it works

This calculator takes an IP address in CIDR notation (e.g. 10.0.0.0/16) and performs bitwise operations to determine the network boundaries. The CIDR prefix length defines how many bits of the address are used for the network portion; the remaining bits identify hosts within that network.

Key terms

Network Address
The first address in the subnet, identifying the network itself. Not assignable to a host.
Broadcast Address
The last address in the subnet, used to send packets to all hosts on the network. Not assignable to a host.
Subnet Mask
A 32-bit mask that separates the network portion from the host portion of an address. For example, /24 produces 255.255.255.0.
Wildcard Mask
The inverse of the subnet mask. Used in ACLs and OSPF configurations. A /24 wildcard is 0.0.0.255.
Usable Hosts
Total addresses minus the network and broadcast addresses. A /24 has 256 total addresses but 254 usable hosts. Exception: /31 networks (RFC 3021) use both addresses for point-to-point links.

How to use this tool

Enter any IP address followed by a CIDR prefix length in the input field (e.g. 10.0.0.0/16 or 192.168.1.50/24). The calculator instantly shows the network boundaries, usable host range, and all related values. You can enter any address within the subnet, not just the network address. The tool will determine the correct network address automatically.

Common subnet sizes

CIDR Subnet Mask Total Addresses Usable Hosts Typical Use
/30255.255.255.25242Point-to-point links between routers
/28255.255.255.2401614Small DMZs, management networks
/27255.255.255.2243230Server VLANs, small departments
/26255.255.255.1926462Medium VLANs, branch offices
/25255.255.255.128128126Larger VLANs, floor networks
/24255.255.255.0256254Standard LAN subnet (most common)
/22255.255.252.01,0241,022Large office floors, Wi-Fi networks
/20255.255.240.04,0964,094Campus networks, cloud VPCs
/16255.255.0.065,53665,534Large enterprise networks, 172.16.x.x ranges
/8255.0.0.016,777,21616,777,21410.x.x.x private space

Subnetting in practice

Splitting a network into smaller subnets

Subnetting divides a larger network into smaller, more manageable segments. For example, if you have 10.1.0.0/16 and need four equal subnets, increase the prefix by 2 bits (since 22 = 4):

  • 10.1.0.0/18 (10.1.0.1 to 10.1.63.254)
  • 10.1.64.0/18 (10.1.64.1 to 10.1.127.254)
  • 10.1.128.0/18 (10.1.128.1 to 10.1.191.254)
  • 10.1.192.0/18 (10.1.192.1 to 10.1.255.254)

Right-sizing your subnets

Choose a prefix length based on the number of devices you expect, plus room for growth. A good rule of thumb is to plan for 2x your current device count. If a VLAN has 40 devices today and might grow to 80, a /25 (126 usable hosts) gives comfortable headroom, while a /26 (62 usable) would be too tight.

Avoid making subnets unnecessarily large. A /16 for a 50-device network wastes address space and creates an oversized broadcast domain that degrades performance. Conversely, subnets that are too small force frequent re-addressing as the network grows.

Special prefix lengths

/31 (2 addresses)
RFC 3021 allows /31 subnets for point-to-point links. Both addresses are usable since there is no need for a network or broadcast address on a two-device link. Saves address space on WAN links.
/32 (1 address)
Represents a single host. Used in routing tables to create a host route, in firewall rules to match a specific IP, and in loopback interface configurations on routers.