Calculator: IPv4 range to CIDR blocks
Enter the labelled inputs to calculate: Count; Result; Count NIP.
Enter a finite value within the formula’s domain and supported numeric range.
How the calculation works
∪CIDRᵢ=[A,B]; CIDRᵢ∩CIDRⱼ=∅
IPv4 uses strict dotted decimal. IPv6 accepts embedded IPv4 tails and compresses the longest leftmost zero run. Zone identifiers are excluded. Prefix tools describe address ranges, not routability or host allocation policy.
Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.
Frequently asked questions
How is the result calculated?
∪CIDRᵢ=[A,B]; CIDRᵢ∩CIDRⱼ=∅
What assumptions apply?
IPv4 uses strict dotted decimal. IPv6 accepts embedded IPv4 tails and compresses the longest leftmost zero run. Zone identifiers are excluded. Prefix tools describe address ranges, not routability or host allocation policy.
How precise are the displayed results?
Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.