Calculate blocks from a prefix difference
For an address width W, a /p network contains 2^(W − p) addresses. W is 32 for IPv4 and 128 for IPv6. Dividing a /p into equal /t blocks yields 2^(t − p) subnets when t is greater than or equal to p. A smaller target prefix would describe a larger block rather than a split.
For example, 192.0.2.0/24 divided into /27 blocks produces 2^(27 − 24) = 8 subnets, each with 32 addresses. The prefixes consume three additional network bits. The total address space is unchanged: 8 × 32 = 256.
Addresses and usable hosts are different counts
A conventional IPv4 /27 LAN has 30 usable host addresses after excluding its network and broadcast addresses. IPv4 /31 point-to-point links can use both addresses under RFC 3021; a /32 represents one address. IPv6 has no broadcast address, so IPv4’s subtract-two rule does not apply.
The IPv4 planner limits materialized results to 4,096 leaves and four tree levels. IPv6 counts remain exact even for much larger theoretical allocations, such as 65,536 /48 blocks inside a /32. It summarizes those blocks without trying to render them all.