Skip to content

CIDR Range Calculator

Network Tools ·
·

Calculate network details from CIDR notation including address range, subnet mask, and usable hosts

CIDR prefix reference: /8 to /32

Usable hosts are total addresses minus the network and broadcast address. The two exceptions are computed in, not glossed over: a /31 gives 2 usable addresses on point-to-point links (RFC 3021), and a /32 is a single host route.

CIDR Subnet mask Addresses Usable hosts
/8 255.0.0.0 16,777,216 16,777,214
/9 255.128.0.0 8,388,608 8,388,606
/10 255.192.0.0 4,194,304 4,194,302
/11 255.224.0.0 2,097,152 2,097,150
/12 255.240.0.0 1,048,576 1,048,574
/13 255.248.0.0 524,288 524,286
/14 255.252.0.0 262,144 262,142
/15 255.254.0.0 131,072 131,070
/16 255.255.0.0 65,536 65,534
/17 255.255.128.0 32,768 32,766
/18 255.255.192.0 16,384 16,382
/19 255.255.224.0 8,192 8,190
/20 255.255.240.0 4,096 4,094
CIDR Subnet mask Addresses Usable hosts
/21 255.255.248.0 2,048 2,046
/22 255.255.252.0 1,024 1,022
/23 255.255.254.0 512 510
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2
/31 255.255.255.254 2 2
/32 255.255.255.255 1 1

Skip the binary arithmetic

You’re designing a VPC in AWS and need subnets for the public tier, private tier, and database tier. You want a /16 for the VPC, but how many hosts does a /20 subnet give you? What’s the address range for 10.0.48.0/20, and where does it overlap with 10.0.32.0/20?

Subnetting by hand means converting to binary, counting bits, and doing modular arithmetic. It’s the kind of thing you learned for the CCNA and never wanted to touch again. Type your CIDR notation and the full breakdown appears instantly.

What you get back

Enter 10.0.0.0/16 and see:

  • Network address: 10.0.0.0
  • Broadcast address: 10.0.255.255
  • Subnet mask: 255.255.0.0
  • Wildcard mask: 0.0.255.255
  • First usable host: 10.0.0.1
  • Last usable host: 10.0.255.254
  • Total addresses: 65,536
  • Usable hosts: 65,534

The wildcard mask is the inverse of the subnet mask. Cisco ACLs and some routing configs want it instead of the standard mask.

Cloud networking decisions

AWS VPC design. You’ve got a /16 VPC (65,534 usable hosts) and want 4 subnets across 2 availability zones. Use /20 subnets (4,094 hosts each) for room to grow, or /24 subnets (254 hosts) if you’d rather carve more, smaller segments.

Security group rules. Allowing traffic from a specific subnet means getting the range exactly right. Calculate it so your CIDR block covers the addresses you intend, not more, not less.

GCP or Azure subnet planning. Same math, different console. Enter your proposed CIDR ranges and confirm they don’t overlap before you create them.

Picking a prefix

The reference table above runs every prefix from /8 to /32 with its subnet mask, total addresses, and usable host count, so there’s no reason to repeat those rows here. The rule of thumb: pick the smallest block that still fits your host count, plus a little headroom. Oversizing burns space you’ll want for the next subnet; undersizing forces a renumber later.

Two prefixes break the usual “usable equals total minus 2” pattern, and they’re worth knowing cold. A /31 gives you 2 usable addresses on a point-to-point link, because RFC 3021 reclaims the network and broadcast addresses that a two-node link never needs. A /32 is a single host route, exactly 1 address, used for loopbacks and rules that must match one specific IP.

Questions people ask

How many usable IPs are in a /24?

  1. A /24 holds 256 total addresses, and you subtract 2 for the network and broadcast addresses, which leaves 254 for hosts. It’s the classic LAN-sized block.

How many hosts does a /27 give you?

30 usable addresses. A /27 has 32 total, minus the network and broadcast, so 30 hosts fit. Good for small segments where a /24 would waste most of the space.

What’s the usable host count on a /16?

65,534. That’s 65,536 total addresses minus 2, which is why a /16 is the default size for a whole VPC or a campus network. The table above shows it next to every other prefix.

What does a /31 give you?

2 usable addresses. Normally you’d subtract 2 and be left with nothing, but RFC 3021 lets a /31 use both addresses on a point-to-point link, since a two-router link has no broadcast to worry about. It’s the standard way to save space on router-to-router hops.

How is a /32 used if it has no host range?

A /32 pins down one specific address with no subnet around it. You’ll see it on loopback interfaces, static host routes, and firewall or security-group rules that need to match a single IP.

What is the wildcard mask for?

It’s the bitwise inverse of the subnet mask, and Cisco ACLs use it instead of the normal mask. For a /24, the subnet mask is 255.255.255.0 and the wildcard is 0.0.0.255. The calculator prints both so you never flip the bits by hand.

For IPv4-to-IPv6 address conversion, the IPv4 to IPv6 Converter handles the math. The IP Address Lookup returns geolocation and ISP info for any IP. Every calculation here runs in your browser, so no network data leaves the page.

network cidr subnet calculator ip range

Related Tools

More in Network Tools