Jump to a section
Quick answer

A CIDR prefix counts the IPv4 bits reserved for the network. /24 means 255.255.255.0 with 254 traditional usable hosts; /25 means 255.255.255.128 with 126; /30 means 255.255.255.252 with 2. Each one-bit increase halves the address block.

Key takeaways

  • A larger CIDR prefix means a smaller IPv4 block.
  • Wildcard masks are the inverse of subnet masks, octet by octet.
  • Traditional usable hosts equal total addresses minus network and broadcast addresses through /30.
  • /31 and /32 follow special rules and should not be treated like ordinary LAN subnets.

/24 to /32 quick-reference table

These are the prefixes most often used for small IPv4 networks and host rules. Traditional usable-host counts subtract the network and broadcast addresses for /24 through /30; /31 and /32 use the special cases shown below.

CIDRSubnet maskWildcard maskBlock sizeTotal / usable
/24255.255.255.00.0.0.255256256 / 254
/25255.255.255.1280.0.0.127128128 / 126
/26255.255.255.1920.0.0.636464 / 62
/27255.255.255.2240.0.0.313232 / 30
/28255.255.255.2400.0.0.151616 / 14
/29255.255.255.2480.0.0.788 / 6
/30255.255.255.2520.0.0.344 / 2
/31255.255.255.2540.0.0.122 / special case
/32255.255.255.2550.0.0.011 / single address

Complete IPv4 CIDR table: /0 to /32

Use this table for larger networks, route summaries, cloud CIDR blocks, access lists, and exact host routes. The usable-host column applies the traditional total-minus-two rule through /30; it is a mathematical reference, not a recommendation to deploy every large block as one LAN.

CIDRSubnet maskWildcard maskTotal addressesUsable hosts
/00.0.0.0255.255.255.2554,294,967,2964,294,967,294
/1128.0.0.0127.255.255.2552,147,483,6482,147,483,646
/2192.0.0.063.255.255.2551,073,741,8241,073,741,822
/3224.0.0.031.255.255.255536,870,912536,870,910
/4240.0.0.015.255.255.255268,435,456268,435,454
/5248.0.0.07.255.255.255134,217,728134,217,726
/6252.0.0.03.255.255.25567,108,86467,108,862
/7254.0.0.01.255.255.25533,554,43233,554,430
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 (point-to-point)
/32255.255.255.2550.0.0.01Single address

How address counts and block boundaries change

IPv4 contains 32 bits. Subtract the prefix length from 32 to find the number of address bits, then raise two to that power. A /27 leaves five address bits, so it contains 2⁵ or 32 total addresses.

Moving from /26 to /27 halves the block from 64 to 32 addresses. In the last octet, /27 networks therefore start at 0, 32, 64, 96, 128, 160, 192 and 224.

  • Total addresses = 2^(32 − prefix length)
  • Traditional usable hosts = total addresses − 2
  • /27 example: 2^(32 − 27) = 32 total addresses

Worked example: 192.168.50.77/27

A /27 block advances in steps of 32. The address .77 falls between the boundaries .64 and .95, so the network is 192.168.50.64 and the broadcast address is 192.168.50.95.

For a traditional LAN, the usable range is 192.168.50.65 through 192.168.50.94. The subnet mask is 255.255.255.224 and the wildcard mask is 0.0.0.31.

  • Block size: 256 − 224 = 32
  • Containing block: 64–95
  • Network: 192.168.50.64
  • Usable: 192.168.50.65–192.168.50.94
  • Broadcast: 192.168.50.95

What a wildcard mask means

A wildcard mask is the bitwise inverse of the subnet mask: subtract each subnet-mask octet from 255. In access-control matching, a wildcard bit of 0 means the corresponding address bit must match, while 1 means it may vary.

For 192.168.50.64/27, the wildcard is 0.0.0.31. In a Cisco-style address-and-wildcard rule, 192.168.50.64 0.0.0.31 matches addresses from .64 through .95. Whether all those addresses are valid hosts is a separate subnet question.

Choose a subnet with enough working room

Count gateways, access points, servers, printers, clients and expected growth before selecting a prefix. The following rows use traditional LAN host counts.

Endpoints required nowSmallest traditional subnetUsable hosts
2/302
6/296
14/2814
30/2730
62/2662
126/25126
254/24254

Special cases: /31 and /32

A /31 has two addresses. On supported point-to-point links, both can represent endpoints because a separate broadcast address is unnecessary. It is not a general replacement for an ordinary two-host LAN.

A /32 represents one exact IPv4 address. It is commonly used for host routes, loopback addresses, firewall rules, and references to a single endpoint.

Check the exact network before applying it

A prefix and host address must be combined to determine the actual network address, broadcast address, and host range. Use the IPv4 subnet calculator for that final check.

  • Confirm that planned subnets do not overlap.
  • Reserve enough capacity for gateways and future devices.
  • Verify DHCP boundaries and static-address reservations.
  • Document each network using its network address and CIDR prefix.

Use the numbers

Related calculators

Common questions

Questions, answered.

What subnet mask is /24?+

/24 is 255.255.255.0. It contains 256 total addresses and traditionally 254 usable host addresses.

What subnet mask is /28?+

/28 is 255.255.255.240. It contains 16 total addresses and traditionally 14 usable host addresses.

How many usable hosts are in a /26?+

A /26 contains 64 total addresses and traditionally 62 usable host addresses.

Can I use both addresses in a /31?+

Yes on a properly supported point-to-point link. /31 is a special case and is not used like a traditional broadcast LAN.

What does /25 CIDR mean?+

/25 reserves 25 IPv4 bits for the network. Its mask is 255.255.255.128, wildcard mask is 0.0.0.127, and each block contains 128 addresses with 126 traditional usable hosts.

Sources & review

How this guide was checked.

NetCalcKit reviews formulas against worked examples and uses primary technical references where they apply. Estimates remain clearly labelled because real networks and services vary.