Subnet Calculator — IPv4 CIDR, Hosts & Ranges

In short: give an IPv4 address and a CIDR prefix and get the whole subnet at once — network and broadcast addresses, netmask and wildcard mask, the usable host range and how many hosts fit, the binary picture, and whether the address is private or public. Everything runs in your browser; no address you type is sent anywhere.

How a subnet is carved out of an address

An IPv4 address is 32 bits. The CIDR prefix says how many of those bits name the network; the rest name hosts inside it. In 192.168.1.0/26 the first 26 bits are fixed, leaving 6 bits — 64 addresses — for the subnet. Two of those addresses are spoken for: all host bits zero is the network address (192.168.1.0), and all host bits one is the broadcast address (192.168.1.63). Everything between, .1 to .62, can be given to devices: 62 usable hosts. The netmask is the same split written as an address — 26 ones then 6 zeros, 255.255.255.192 — and the wildcard mask used by Cisco ACLs and OSPF is its mirror image, 0.0.0.63. Every figure in the result comes from this one bit split, which is why the binary row matters: once you can see where the boundary falls, subnetting stops being memorised tables and becomes reading.

Two edge cases break the "minus 2" rule and are worth knowing before they surprise you. A /32 is one address — a host route. A /31 has two addresses and no room for the classic network/broadcast pair, yet RFC 3021 permits exactly that on point-to-point links, where both addresses are used by the two routers and no broadcast exists. And in the clouds the count shrinks again: AWS and Azure reserve five addresses in every subnet (network, broadcast and three of their own), so a /24 that would hold 254 devices on-premises holds 251 in a VPC. The result panel shows the classic count as the headline and calls out the cloud figure separately, because mixing the two up is a standard cause of "the subnet is full" tickets that make no sense on paper.

Private ranges (RFC 1918) are the other thing the result checks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 can be used by anyone internally and are never routed publicly. If you are planning a network, subnets are normally carved from these ranges; if you are troubleshooting, an unexpected public address inside a LAN — or a private one outside it — is often the whole bug.

Worked examples

The home-office /26. 192.168.1.0/26 → netmask 255.255.255.192, wildcard 0.0.0.63, network 192.168.1.0, broadcast 192.168.1.63, usable 192.168.1.1 – 192.168.1.62 = 62 hosts. The next /26 in the same /24 starts at .64.

The classic /24. 192.168.0.0/24 → 256 addresses, 254 usable (.1–.254), broadcast .255. In AWS the same block gives 251 usable addresses after the five reservations.

The router link /30. Any /30 → 4 addresses, 2 usable — exactly one for each end of a point-to-point link, which is why /30 (and now /31) is the default size for router-to-router connections.

CIDR quick reference

CIDRNetmaskTotal addressesUsable hosts
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/24255.255.255.0256254
/26255.255.255.1926462
/28255.255.255.2401614
/30255.255.255.25242
/32255.255.255.25511 (host route)

Splitting a block — subnetting in practice (VLSM)

Real networks are rarely one subnet. The standard job is VLSM — variable-length subnet masking: take one block and carve it into pieces sized to each need, largest first so the boundaries stay aligned. Say you hold 192.168.1.0/24 and three departments need roughly 50, 25 and 10 devices. The 50-device department takes a /26 (62 usable): 192.168.1.0/26, covering .0–.63. The 25-device department takes a /27 (30 usable) starting where the /26 ended: 192.168.1.64/27, covering .64–.95. The 10-device team takes a /28 (14 usable): 192.168.1.96/28, covering .96–.111. Everything from .112 onwards — more than half the original block — remains free for the next carve-up, and each piece can be checked in the calculator above. Two rules keep the carving valid: every subnet must start on a multiple of its own size (a /27 can start at .64 or .96, never at .100), and pieces must never overlap. Worked largest-first, both rules satisfy themselves; worked smallest-first, you eventually meet a gap too small for the piece you still owe.

Frequently asked questions

How many usable hosts are in a /24 subnet?

254. A /24 has 2^8 = 256 addresses in total; the first is the network address and the last is the broadcast address, leaving 254 for devices. The same rule — total minus 2 — applies to every subnet from /8 to /30. A /26 has 62 usable hosts, a /30 has just 2, which is why /30 is the classic size for a point-to-point link between two routers.

What is a wildcard mask?

The wildcard mask is the bitwise inverse of the netmask: where the netmask has 1s the wildcard has 0s and vice versa. A /26 netmask of 255.255.255.192 has the wildcard 0.0.0.63. Wildcard masks appear in Cisco ACLs and OSPF network statements, where they say which bits of an address must match and which may vary.

Why do AWS and Azure subnets have fewer usable IPs?

Both clouds reserve five addresses in every subnet: the network address, the broadcast address, and three for the cloud's own routing, DNS and future use (the .1, .2 and .3 addresses in AWS; a similar set in Azure). A /24 in AWS therefore offers 251 usable addresses, not 254. This calculator shows the classic count and flags the cloud adjustment so the two numbers never get mixed up.

What is the difference between /31 and /32?

A /32 is a single address — a host route, used for loopbacks and exact-match routing. A /31 has two addresses; under the classic rule both would be network and broadcast, leaving none usable, but RFC 3021 allows /31 on point-to-point links where both addresses are usable because there is no broadcast on such a link. The calculator reports the classic figure and notes the exception.

Is 192.168.x.x a private address?

Yes. RFC 1918 reserves three private ranges that anyone may use inside their own network and that are never routed on the public internet: 10.0.0.0/8, 172.16.0.0/12 (172.16 to 172.31) and 192.168.0.0/16. The calculator marks any address in these ranges as private, along with loopback (127.0.0.0/8) and link-local (169.254.0.0/16) addresses.

Note: results follow the classic RFC 791/4632 rules with the RFC 3021 /31 exception noted. Cloud providers and some vendors reserve additional addresses; check your platform's documentation before finalising an addressing plan.

Related tools

Addressing rules last verified: 23 November 2026. Your addresses never leave your browser — everything is calculated on this page.