CIDR → hosts

/n tem 2^(128-n) endereços.
Created by
Renato Passos, Eng. de Software
Reviewed by
Renato Passos, Eng. de Software

Last updated: Apr 18, 2026

Hosts possíveis
1.21e+24

Formula

2^(128-n)

About this calculator

The CIDR → hosts calculator determines the number of IPv6 addresses available in a network based on the CIDR prefix length. For a '/n' prefix, the formula used is 2^(128 - n), representing the total possible addresses in that subnet. For example, a '/64' prefix generates 2^64 addresses, while '/128' indicates only one address (the host itself).

This tool is useful for IPv6 network projects, such as subnet planning, address allocation, and infrastructure optimization. Common prefixes like '/64' are used in local networks, allowing billions of addresses per subnet, ideal for IoT devices and future scalability.

Precautions: Prefix values below '/0' or above '/128' are invalid. Although IPv6 does not use broadcast addresses, it is still practical to reserve the first and last address for network identification in some contexts. The calculator does not subtract these addresses by default, but users should consider this in real-world scenarios.

To understand the prefix impact on the network, enter a value from '/0' to '/128'. The result shows the exponential scale of available addresses, crucial for avoiding overload or address space waste.

Frequently asked questions

How does the formula 2^(128-n) work?

The formula calculates the total IPv6 addresses in a subnet. For a '/n' prefix, each subnet has 2^(128-n) addresses based on the 128-bit IPv6 address space.

Why not subtract 2 addresses (network and broadcast)?

IPv6 does not use broadcast addresses, but the first and last addresses are often reserved for network identification. The calculator does not subtract these by default, though you should account for them in your setup.

What prefixes are recommended for local networks?

'/64' prefixes are standard for local IPv6 networks. They provide 2^64 addresses per subnet, sufficient for IoT devices, computers, and future expansion.

What happens with '/0' or '/128' prefixes?

'/0' represents the entire IPv6 address space (2^128 addresses), while '/128' is a single address (the host itself). Invalid values trigger an error in the calculator.

Other IPv6 calculators