CompTIA Network+ Formulas & Calculators
Plug in your numbers and see every result worked out, step by step — then use the reference below to recognise which formula a question is really asking for.
← Back to the full “How to pass CompTIA Network+” guideIPv4 subnet calculator
Enter any host address and a prefix length (CIDR) to get the whole subnet — the network and broadcast addresses, usable host range, mask, and host count.
Network address
192.168.1.0/24
Broadcast address
Usable host range
Subnet mask
/24
Wildcard mask
Usable hosts
2^(32 − prefix) − 2
Total addresses
2^(32 − prefix)
Formula reference
What each formula means and when to reach for it on exam day.
-
Usable hosts per subnet
hosts = 2^(32 − prefix) − 2
Total addresses minus the network and broadcast addresses.
When: Sizing a subnet, or picking a prefix that fits a required host count.
-
Subnets when borrowing bits
subnets = 2^(borrowed bits)
How many equal subnets a longer prefix creates from a block.
When: Splitting a network into a target number of subnets.
-
Block size (magic number)
block = 256 − mask octet
The increment between subnet network addresses in the interesting octet.
When: Quickly listing subnet boundaries without binary math.
-
Wildcard mask
wildcard = 255.255.255.255 − subnet mask
The inverse of the mask — which bits are "don’t care".
When: ACLs and OSPF, which match on wildcard rather than subnet masks.
-
CIDR prefix ⇄ mask
/24 = 255.255.255.0, /26 = 255.255.255.192
The prefix length is just the count of leading 1-bits in the mask.
When: Translating between CIDR notation and a dotted-decimal mask.
-
Point-to-point /31
/31 → 2 usable hosts (RFC 3021)
A /31 link uses both addresses; there is no broadcast on the link.
When: Router-to-router links, to conserve addresses.
Frequently asked questions
- Do you have to subnet by hand on the Network+ exam?
- Yes. CompTIA does not provide a calculator, so you should be able to work out usable host counts, subnet boundaries, block sizes, and CIDR-to-mask conversions on paper or in your head under time pressure.
- What subnetting formulas are on CompTIA Network+ (N10-009)?
- Usable hosts = 2^(32 − prefix) − 2, subnets = 2^(borrowed bits), block size = 256 − mask octet, the wildcard mask (used by ACLs and OSPF), and the /31 point-to-point case from RFC 3021.