Subnet calculator

Enter an IPv4 address and a CIDR prefix to get the network and broadcast addresses, the usable host range, subnet and wildcard masks, and the host count — instantly. Free, no signup.

IP address & prefix
Usable hosts254
Network address192.168.1.0
Broadcast address192.168.1.255
Usable host range192.168.1.1 – 192.168.1.254
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
CIDR notation192.168.1.0/24
Total addresses256
IP classC
Address typePrivate
Mask (binary)11111111.11111111.11111111.00000000

CIDR cheat sheet

The prefixes you'll meet most on Network+, A+, and CCNA.

CIDRSubnet maskUsable hosts
/16255.255.0.065,534
/18255.255.192.016,382
/20255.255.240.04,094
/22255.255.252.01,022
/23255.255.254.0510
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/31255.255.255.2542
/32255.255.255.2551

The block-size method in 20 seconds

You don't need binary once the mask octets are memorized — 128, 192, 224, 240, 248, 252, 254, 255. Every subnet question becomes arithmetic:

  1. Find the block size: subtract the interesting mask octet from 256. For /26 (192): 256 − 192 = 64.
  2. Step in blocks: subnets start at 0, 64, 128, 192. Your address falls in the block at or below it → that's the network.
  3. Broadcast: one below the next block. For 192.168.1.130 /26 → network 192.168.1.128, broadcast 192.168.1.191.

Want to get fast at this? Drill it under a timer until it's reflex.

Subnetting is one Network+ objective

The N10-009 exam has five domains. Take the free 25-question diagnostic to see where you actually stand — and get a daily plan built from your weak spots.

Take the free diagnostic

Not ready to sign up? Try the free Network+ practice test — no account needed.

Frequently asked questions

How do I calculate a subnet by hand?

Use the block-size (magic number) method. Find the interesting mask octet (the one that isn't 0 or 255), subtract it from 256 to get the block size, and the subnets step by that block: 0, block, 2×block… Your address falls in the block at or below it — that's the network address, and the broadcast is one below the next block. For /26 (mask 255.255.255.192): 256 − 192 = 64, so 192.168.1.130 sits in the .128 block → network 192.168.1.128, broadcast 192.168.1.191.

How many usable hosts are in a /26?

62. Host bits are 32 − 26 = 6, so 2^6 = 64 total addresses, minus the network and broadcast addresses = 62 usable. The same math gives 254 for a /24, 30 for a /27, and 2 for a /30 (the classic point-to-point link).

What is a wildcard mask?

The bitwise inverse of the subnet mask — where the mask has 1s, the wildcard has 0s. A /24 mask of 255.255.255.0 has a wildcard of 0.0.0.255. Cisco ACLs and OSPF network statements use wildcard masks instead of subnet masks, so it's worth being able to flip between them.

What's the difference between a /31 and a /30?

A /30 has 4 addresses: network, two usable hosts, and broadcast — the traditional point-to-point link. A /31 (RFC 3021) drops the network/broadcast distinction so both addresses are usable, saving an address on point-to-point links. This calculator counts a /31 as 2 usable hosts with no broadcast.

Is this subnet calculator free?

Yes — unlimited, no account. If you're studying for Network+ or A+, a free CertBench account adds timed subnetting drills, the full question bank with spaced repetition, and a readiness score across every exam domain.