Total IPv4 addresses in a CIDR block
Use the inputs below to calculate «Total IPv4 addresses in a CIDR block»: IPv4 prefix length. Use consistent units and check the assumptions.
Changes number formatting only, not currency, units or country-specific rules.
Compare scenarios
Save up to four scenarios temporarily on this page. Inputs are not stored or sent to the server by this feature. The comparison disappears when you reload or leave the page.
Use the browser print dialog to save the current result and comparisons as PDF if supported. No file is uploaded.
How to use this calculator
Enter the following values:
- IPv4 prefix length
The result updates automatically as you change the inputs. Use the example below to check the calculation.
Practical considerations
The result counts every address in the CIDR block, not assignable hosts. Traditional subnets reserve network and broadcast addresses; /31 point-to-point links and /32 host routes have different semantics.
Formula
(2 ^ (32 − prefix))Use the units shown; monetary values use the same currency throughout.
Worked example
- IPv4 prefix length
- 24
Result: 256
Results are estimates; verify assumptions before making decisions.