A subnet's block size equals 2 raised to the power of the host bits in the prefix — for a /24, that's 2^8 = 256 total addresses, of which 254 are usable hosts. The number after the slash tells you how many leading bits identify the network; the remaining bits (32 minus that number) define how many addresses each subnet contains before the next one begins. Converting that count to a dotted subnet mask (255.255.255.0 for /24) and a wildcard mask (0.0.0.255) is the rest of the answer. For a /20 the block size is 2^12 = 4,096 addresses; for a /16 it's 2^16 = 65,536; for a /30 it's 2^2 = 4 addresses with only 2 usable. The two exceptions, per RFC 3021 and single-host semantics, are /31 (2 addresses, both usable on point-to-point links) and /32 (1 address, a single host such as a loopback). Use the Subnet Calculator to skip the math — enter an IPv4 address with a CIDR prefix or dotted mask and the tool returns the network, broadcast, host range, mask, wildcard, IP class, and RFC 1918 status, all computed locally in your browser.

What "Subnet Block Size" Means
A subnet block size is the total count of IPv4 addresses contained in one subnet — every address between the network address and the broadcast address, inclusive. "Block size" and "subnet size" are used interchangeably in network planning, and the value tells you how many numbered slots exist for interfaces before the next subnet begins. If a /24 holds 256 addresses, the next subnet starts exactly 256 addresses later, which is why block size is also the increment between adjacent networks on a routing diagram.
Before CIDR (Classless Inter-Domain Routing, RFC 4632) the address space was sliced into rigid Class A, B, and C sizes — roughly 16 million, 65,536, and 256 addresses respectively. CIDR replaced those fixed boundaries with an arbitrary prefix length, letting an operator borrow bits from the host portion as needed. A /27 carves a former Class C into eight pieces of 32 addresses each, while a /20 stretches a former Class B into sixteen pieces of 4,096. Block size is the same idea expressed as a count rather than a prefix, and it is the number most engineers quote when they ask "how big is this subnet?"
The Block Size Formula and Why It Works
The block size equals 2 raised to the power of the host bits, where host bits = 32 − prefix length. The intuition is that each host bit doubles the number of combinations, so removing even one bit halves the block, and adding one bit doubles it. The same arithmetic produces the subnet mask in dotted form: with 24 network bits, the first three octets are all ones (255.255.255) and the last octet is zero, written 255.255.255.0.
Every value the Subnet Calculator reports — network, broadcast, first and last usable host, total and usable counts, subnet mask, and wildcard — falls out of these bit operations applied to the address and the prefix. The wildcard mask is the bit-for-bit inverse of the subnet mask (0.0.0.255 for /24), the format access control lists and OSPF network statements use to match a range. For a deeper walkthrough of how the network bits are split out of an address and a mask, see how to calculate subnet bits from an IP and mask.
For a fast mental check, remember the doubling pattern from /32 downward: /32 = 1, /31 = 2, /30 = 4, /29 = 8, /28 = 16, /27 = 32, /26 = 64, /25 = 128, /24 = 256. For non-byte-aligned prefixes, take the next-larger power of two and step down by factors of two until you reach the prefix you want — a /22 sits between /24 (256) and /20 (4,096), specifically at 2^10 = 1,024.
Quick Reference: CIDR Prefix to Block Size
The table below lists block size and usable-host counts for the most common CIDR prefixes. Block size follows the standard rule 2^(32 − prefix); usable hosts = total − 2 for prefixes through /30. For /31 and /32 the standard formula does not apply, so the calculator applies the RFC 3021 and single-host rules.
| CIDR | Subnet mask | Block size | Usable hosts |
|---|---|---|---|
| /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 |
| /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 (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 |
Calculate Subnet Block Size With the Subnet Calculator
Skip the manual arithmetic by using the Subnet Calculator. Enter an IPv4 address and either a CIDR prefix or a dotted mask, and the tool returns the block size and every related value in one row, computed locally with 32-bit unsigned bitwise math so nothing leaves your device.
- Type an IPv4 address such as 192.168.1.10 into the address field.
- Choose a CIDR prefix (for example /24) or switch to Subnet mask and enter one like 255.255.255.0.
- Read the results table: network and broadcast addresses, the first and last usable host, usable and total host counts, subnet and wildcard masks, IP class, and RFC 1918 private status update instantly.
Use the same flow to verify a block you already planned, or to reverse-engineer an unfamiliar prefix — paste an address, type the prefix you have in mind, and the calculator returns the full set of values for that prefix.
Block Size, Usable Hosts, and Wildcard — What's Different
Block size, usable hosts, subnet mask, and wildcard mask are four views of the same prefix, and they get mixed up often. Block size is the total count of addresses in the subnet, including the network and broadcast. Usable hosts is block size minus the two reserved addresses (for prefixes up to /30), which is the count you actually assign to interfaces. Subnet mask is the dotted form of the prefix used wherever routing protocols and host configurations expect the classic A.B.C.D layout. Wildcard mask is the bit-inverse of the subnet mask, used in Cisco ACLs and OSPF network statements, where a 1 bit means "any value here" and a 0 bit means "must match."
A /24 LAN often cited as "256 addresses" really means 256 total, 254 usable, mask 255.255.255.0, wildcard 0.0.0.255. The Subnet Calculator prints all four side by side so you don't have to mentally switch between them when configuring routers, firewall rules, or DHCP scopes.
Special Cases: /31 and /32 Break the Rule
Two prefixes do not fit the block-minus-two pattern. Per RFC 3021, a /31 is reserved for point-to-point links: it has only two addresses and both are usable hosts, with no separate network or broadcast. The Subnet Calculator reflects this and reports 2 usable hosts instead of 0, which is what you want when configuring a router-to-router serial link that needs no subnet bookkeeping.
A /32 describes a single host — the network, broadcast, and host are the same address. Loopback interfaces (127.0.0.1/32) and single-host firewall rules use this prefix, and the calculator reports 1 usable host. For everything from /30 down to /0, the standard rule applies: block size = 2^(32 − prefix), usable hosts = block size − 2.
RFC 1918 private ranges also matter when planning blocks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for internal use behind NAT and never routed on the public internet. The calculator flags any address inside those blocks as RFC 1918 private, so you know whether a service on that address can be exposed directly or must sit behind a gateway.
For a deeper look, see Turn an HTML Table into JSON for Power Automate.