Skip to content

Subnet & CIDR Calculator Guide: Masks, Hosts and Subnetting

A practical guide to CIDR and subnetting — what the /prefix means, how to count hosts, where the network and broadcast addresses come from, and how to carve a block into subnets.

Open the Subnet & CIDR Calculator →

What this tool does

The Subnet & CIDR Calculator turns an IPv4 block like 10.0.0.0/16 into every number you need to plan or debug a network: the network and broadcast addresses, the first and last usable host, the netmask and its wildcard inverse, and the host count. It also splits a block into equal smaller subnets.

How CIDR notation works

CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length: the number after the slash is how many leading bits are fixed as the network portion. A /24 fixes the first 24 bits, leaving 8 bits — 256 addresses — for hosts. Every extra bit of prefix halves the block; every bit fewer doubles it.

PrefixNetmaskAddressesUsable hosts
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/30255.255.255.25242

Network, broadcast and usable hosts

The network address is the block with all host bits set to 0; the broadcast address has them all set to 1. Neither can be assigned to a device, which is why a /24 has 256 addresses but only 254 usable hosts. The usable range is everything in between. (A /31 is the exception — RFC 3021 allows its two addresses to be used on point-to-point links, and a /32 is a single host route.)

Splitting a block into subnets

To divide 10.0.0.0/24 into four, you borrow two host bits to make four /26 subnets of 64 addresses each: 10.0.0.0/26, 10.0.0.64/26, 10.0.0.128/26, 10.0.0.192/26. Enter the target prefix in the Split box and the calculator lists them. Each step of prefix doubles the number of subnets and halves their size.

Private and public addresses

The tool labels the well-known reserved ranges: the RFC 1918 private blocks (10/8, 172.16/12, 192.168/16) used inside home and corporate networks, plus loopback and link-local. Private addresses are not routable on the public internet, which is why NAT exists. Everything else is treated as public.

Privacy

Every calculation is integer arithmetic done in your browser. No address you enter is sent anywhere — safe for planning internal networks you would not want to disclose.

Ready to try it? Open the Subnet & CIDR Calculator →

Related guides