March 26, 20264 min read

Subnet and CIDR Calculator

Calculate subnet masks, network addresses, broadcast addresses, and host ranges from CIDR notation. Essential tool for network planning and troubleshooting.

networking subnet cidr ip address calchub
Ad 336x280

Subnetting is one of those skills that seems needlessly complex the first time you encounter it, and then clicks completely once you understand what problem it's solving. Breaking a large network into smaller subnets lets you control broadcast traffic, apply different security policies, and organize devices logically. The CalcHub Subnet Calculator handles all the bit-math so you can focus on the planning.

What the Calculator Gives You

Enter any IP address in CIDR notation (like 192.168.10.0/24) and get:

  • Network address — the base address of the subnet
  • Broadcast address — the last address, reserved for broadcast traffic
  • Subnet mask — in dotted decimal (255.255.255.0) and hex
  • Wildcard mask — inverse of subnet mask, used in ACLs
  • First/last usable host — actual range you can assign to devices
  • Number of usable hosts
  • IP class and whether it's private or public
It also has a subnet splitting mode: enter a parent network and how many subnets you need, and it calculates the prefix length and lists all subnets.

CIDR Quick Reference

CIDRSubnet MaskHostsTypical Use
/8255.0.0.016,777,214Large ISP or enterprise
/16255.255.0.065,534Campus network
/24255.255.255.0254Office LAN
/25255.255.255.128126Split office LAN
/28255.255.255.24014Small server cluster
/30255.255.255.2522Point-to-point link
/31255.255.255.2542 (no broadcast)Router-to-router (RFC 3021)
/32255.255.255.2551Host route / loopback

Practical Example: Planning an Office Network

Your company has 192.168.0.0/16 assigned. You need separate subnets for:


  • Staff desktops (max 200 devices)

  • Servers (max 20 devices)

  • Guest WiFi (max 100 devices)

  • Printers (max 15 devices)

  • Management/network gear (max 10 devices)


Running through the calculator:

DepartmentSubnetMaskHosts Available
Staff192.168.1.0/24/24254
Servers192.168.2.0/27/2730
Guest WiFi192.168.3.0/25/25126
Printers192.168.4.0/28/2814
Management192.168.5.0/28/2814
Each subnet is sized to fit its devices with some growth headroom, and they're all separate broadcast domains — meaning a broadcast storm on guest WiFi won't affect servers.

IPv4 vs IPv6 Support

The calculator handles both IPv4 and IPv6. IPv6 subnets follow the same logic but with 128-bit addresses. A /64 IPv6 subnet (the standard allocation for a single LAN) has 2⁶⁴ addresses — enough that you could give a unique address to every atom in several cups of water. For IPv6, the calculator also shows the subnet's EUI-64 range and link-local prefix.

Tips

  • Always document your subnets. Use the calculator's export function to generate a spreadsheet of your allocation plan before you start configuring switches and routers.
  • Leave room to grow. If you have 50 devices today, allocate a /25 (126 hosts) not a /26 (62 hosts). Renumbering a subnet later is painful.
  • VLANs and subnets aren't the same thing. A VLAN is a Layer 2 concept; a subnet is Layer 3. They're often paired 1:1, but understanding the distinction matters for routing.

What's the difference between a subnet mask and a CIDR prefix?

They're two ways of expressing the same thing. A /24 prefix means the first 24 bits are the network portion — equivalent to a 255.255.255.0 subnet mask. CIDR notation is more compact and is used in routing tables.

Can I subnet a public IP block?

Yes. If your ISP assigns you 203.0.113.0/29 (6 usable addresses), you can allocate individual IPs as /32 host routes or sub-allocate the block. The rules are the same as private addressing.

What does "variable length subnet masking" (VLSM) mean?

VLSM means using different prefix lengths in different parts of your network — /24 for a large LAN, /30 for WAN links. Modern IP networks all use VLSM; classful networking (where all subnets in a network had the same mask) was deprecated with the introduction of CIDR.

Ad 728x90