CIDR Calculator
Calculate IPv4 or IPv6 network boundaries, mask, last address and exact address count. Compressed IPv6 and embedded IPv4 tails are accepted; IPv6 counts remain exact decimal strings.
- Explicit formulas and worked examples
- Check your inputs, then calculate
- Data is calculated in this browser only
Check the stated input format, calculation convention and limits before using the result.
Check the example inputs, then calculate. Your values stay in this browser.
IPv4 uses /0–/32, with /31 point-to-point and /32 single-address host-count conventions. IPv6 uses /0–/128 and has no broadcast-address subtraction.
Understand the CIDR Calculator
Choose the right record before calculating
Enter address/prefix notation in the correct family. A larger prefix number produces a smaller block. Inspect the canonical network and last address, and keep exact IPv6 counts as text when exporting. CIDR describes a range, not how many active machines it should contain.
Content and calculation reviewed:
Understand the calculation
How to use it and the math behind it
Four steps to check your inputs and results
- Calculate IPv4 or IPv6 network boundaries, mask, last address and exact address count. Compressed IPv6 and embedded IPv4 tails are accepted; IPv6 counts remain exact decimal strings.
- Enter IPv4/prefix or IPv6/prefix in the stated format. Baseline values are for reproduction.
- Check the output unit and convention: Read network with its stated unit and convention. The default example and the independent worked scenario use different inputs, so compare the assumptions before comparing the numbers.
- Change one input and compare the result. IPv4 uses /0–/32, with /31 point-to-point and /32 single-address host-count conventions. IPv6 uses /0–/128 and has no broadcast-address subtraction. A count does not establish device routability or subnet allocation policy. VLSM planning, zone identifiers, discovery and configuration are outside this tool.
CIDR Calculator: calculation relationships
CIDR combines an IPv4 address and prefix in one string. The host portion of 192.0.2.5/31 is rounded down to the aligned network 192.0.2.4; the block contains .4 and .5. RFC 3021 permits both on a point-to-point link. That convention is not a promise that any device or broadcast network accepts the configuration. IPv6 has 128 address bits: 2001:db8::/64 contains 2⁶⁴ = 18,446,744,073,709,551,616 addresses. It has no IPv4-style broadcast-address subtraction, and its exact count is kept as a decimal string.
size = 2^(address bits−prefix); network = floor(address/size) × size; address bits = 32 or 128
The detailed guide adds variable definitions, a reproducible example, a practice question and model limitations.
Questions before you calculate
Does a higher prefix mean more addresses?
No. It leaves fewer host bits and creates a smaller block.
How many /28 blocks fit in /24?
Sixteen aligned blocks.
How many /64 blocks fit in /56?
Two hundred fifty-six.
Does :: compression reduce IPv6 bit width?
No. It abbreviates zero groups within the 128-bit address.
Are raw counts equal to deployable-device counts?
Not necessarily. Address roles and network policies are separate.
From question to result