Talk to a specialist

BLOG VLSM.io

How to calculate IPv6 subnets

Learn to divide IPv6 prefixes using hexadecimal examples, /64 subnet calculations, and criteria for turning arithmetic into an operational plan.

IPv6-only egressConnectivity and intelligence
Globe with IPv6-only outbound connections
IPv6-only egress2001:db8::24Illustrative addresses
Estimated reading time: 7 min8 sections
How to calculate IPv6 subnets
How to calculate IPv6 subnets
01

Read the address before dividing the prefix

An IPv6 address contains 128 bits, usually written as eight groups of four hexadecimal digits. Each digit represents four bits, and each group represents sixteen. The prefix after the slash states how many bits identify the network. In 2001:db8:1234:ab00::/56, the first 56 bits are fixed. Double colons abbreviate zero groups without changing address length. When checking a calculation, expanding abbreviated groups mentally or with a tool helps locate the exact position where network bits end and variable bits begin.

Examples in this article use 2001:db8::/32, reserved for documentation. They support learning and should not be deployed as real public addressing. Distinguish equivalent written forms of the same address as well. Leading zeros and abbreviated groups can change appearance without changing value. In inventories and software, normalize presentation and compare addresses with an appropriate library. Simple text comparison may treat equivalent addresses as different or order prefixes in a way that is unsuitable for checking allocation and identifying overlaps.

CONNECTIONS IN MOTIONThe path of your connection
ApplicationJob or integration
ConnectivityIPv6-only egress
DestinationSystem or service
The illustrated service uses IPv6-only Internet egress. IPv4 egress requires a separate service. The animation does not represent live traffic.
02

Count subnets from the difference between prefixes

To calculate how many equal child subnets fit inside a block, subtract the original prefix from the new prefix and use the result as an exponent of two. The formula is 2^(new prefix − original prefix). Dividing a /56 into /64s uses eight additional bits, producing 2⁸, or 256 subnets. Dividing a /48 into /64s uses sixteen bits and produces 65,536. This counts smaller networks inside a larger network, not interfaces, customers, proxy sessions, or traffic capacity.

The direction matters. A /64 is smaller than a /56 because it fixes more bits. You can divide a /56 into /64s, but cannot extract multiple /56s from a single /64. When the difference is negative, the question probably describes aggregation or a larger parent block rather than subdivision. Before using a calculator, describe the available resource and desired size in words. This simple check reduces interpretation errors in proposals, spreadsheets, and automation that allocates prefixes to newly created networks.

Parent blockChild subnetQuantity
/60/6416
/56/64256
/48/56256
/48/6465,536
/29/56134,217,728
/29/6434,359,738,368
03

Worked example: dividing a /56 into /64s

Consider 2001:db8:1234:ab00::/56. The first three groups represent 48 bits, and the first two digits of the fourth group add eight, completing the /56. The ab portion therefore remains fixed while the last two digits of that group vary from 00 through ff. Initial /64 prefixes are 2001:db8:1234:ab00::/64, 2001:db8:1234:ab01::/64, and 2001:db8:1234:ab02::/64. The sequence ends at 2001:db8:1234:abff::/64. There are exactly 256 combinations, including both endpoints, without enumerating every address inside each network.

An illustrative plan reserves ab00 for one network, ab01 for another, and additional ranges for growth. Record each subnet purpose, owner, and location in the inventory. Do not rely on the numeric sequence as the only documentation. If a network changes roles, an informal interpretation of its number may become outdated. Also distinguish an interface address, such as a value ending in ::10, from the containing /64 prefix. The former identifies an interface in that context; the latter describes the entire set.

TRAFFIC AND ADDRESSINGOne IPv6 service. IPv6-only egress.
Source2001:db8::24
Destination2001:db8::20
Return2001:db8::24
The outbound path of this service uses IPv6 only. Reaching an IPv4 destination requires a separate IPv4 service; there is no dual-stack egress. Illustrative addresses.
04

Working with hexadecimal boundaries

Divisions at multiples of four bits are particularly easy to visualize because they align with hexadecimal digits. A /60 inside that /56 fixes another digit in the fourth group. The /60 blocks therefore begin at ab00, ab10, ab20, continuing through abf0. Each /60 contains sixteen /64s. Moving from ab0f to ab10 is an ordinary hexadecimal increment, not an unexplained jump. Understanding this count helps verify reservations and prevents treating digits a through f as letters without numeric meaning.

Prefixes outside these boundaries are also valid, but require attention to bits within a digit. Use binary calculation or a library that confirms the network and boundaries. Do not round a received prefix to a seemingly more convenient size, because that can include addresses outside your delegation. The plan must remain entirely within the authorized parent block. When reviewing subdivisions, check both child size and position: a correct count can still conceal an incorrectly aligned starting point or a child extending beyond its parent.

05

Calculating larger blocks without losing context

The same formula applies to larger blocks. A /29 divided into /64s uses 35 bits, yielding 2³⁵, or 34,359,738,368 /64 subnets. Divided into /56s, that /29 uses 27 bits and accommodates 134,217,728 /56 subnets. These figures express a mathematical relationship between sizes. They do not establish that an organization will receive the resource, that every child may be individually announced on the Internet, or that physical capacity exists for any service volume. Policy, routing, and infrastructure require separate evaluation.

In practice, a hierarchy can reserve blocks by region, site, and function, enabling route summarization at suitable points. The actual number of installed routes depends on design and equipment, not simply on the possible subnet total. Clearly distinguish reserved space from active networks. Creating billions of individual records would be unnecessary to represent an aggregated reservation. Management tools should work with prefixes and containment relationships, creating detailed allocations as real requirements arise while retaining the history and reasoning behind addressing decisions.

06

The role of /64 in local networks

An IPv6 subnet size should not be chosen by copying the IPv4 host formula. On conventional local networks using SLAAC autoconfiguration, /64 is the important operational reference. It separates the network prefix from the portion used for interface identification in that model. Specific scenarios use other sizes, including certain links and host routes, but require their own technical justification. Shrinking a LAN merely to save addresses may violate operating assumptions without producing a meaningful operational benefit for the organization deploying it.

Do not automatically subtract two addresses as with conventional IPv4 LANs either. IPv6 does not use the same broadcast model, and the interpretation of particular addresses depends on its architecture. When sizing a site, the relevant question is often how many local networks are needed and how they will grow. A site with ten segments may need a delegation accommodating those segments and reserves rather than a minimal address count per device. This approach creates a more stable plan as new functions are introduced.

FROM CONNECTION TO RESULTTurn requirements into an observable operation.
Plan
Connect
Monitor
Destination planning, connectivity configuration, and result validation are complementary steps. The animation represents this workflow.
07

Turn the calculation into a verifiable configuration

Before deployment, validate alignment, containment, and absence of overlap. Record the parent block, child subnet, purpose, owner, and allocation state. Verify how the prefix will be delivered and announced inside your infrastructure. Test DNS, source selection, and communication between authorized segments as well. Correct arithmetic does not confirm that a router received the delegation or that a firewall permits the intended flow. Operational acceptance must demonstrate that the network behaves according to the documented plan, including its segmentation and access requirements.

When arranging delivery with VLSM.io, describe the network count, locations, connection method, and expansion expectations. The discussion can then distinguish prefix size, bandwidth, and operational requirements. Keep mathematical examples as references, but replace documentation blocks with authorized resources in the final configuration. When calculation, inventory, and validation follow the same standard, growth no longer depends on improvised choices. It uses an addressing structure the entire team can understand, maintain, and extend without repeatedly rediscovering how earlier allocations were made.

08

Institutional references

Reference documents on the topics covered in this article.