CIDR usable host count calculator
Estimate addresses in an IPv4 CIDR block and the conventional assignable host count. Enter your values below to see the result and method.
inputs.
Related calculators and articles
Compare methods and explore more free tools in computer science.
How to use the CIDR usable host count calculator
Estimate addresses in an IPv4 CIDR block and the conventional assignable host count. Use the free tool above without creating an account.
What it calculates
Estimate addresses in an IPv4 CIDR block and the conventional assignable host count. The block count depends on the selected address family and integer prefix; IPv4 usable-host conventions differ from the full IPv6 address count.
Inputs and units
Enter the values below for this model. Integer number of leading network bits: 0–32 for IPv4 or 0–128 for IPv6. Select IPv4 or IPv6; the prefix range and address-block convention depend on this choice.
- CIDR prefix length: Integer number of leading network bits: 0–32 for IPv4 or 0–128 for IPv6.
- Address family (4 or 6): Select IPv4 or IPv6; the prefix range and address-block convention depend on this choice.
Formula and method
addresses = 2^(32 − prefix); conventional hosts = addresses − 2
The calculator applies this relationship directly and keeps intermediate values unrounded for the displayed estimate.
Worked example
A /24 block contains 256 IPv4 addresses; under the common subnet convention, 254 are host addresses.
How to interpret the result
The address count gives the subnet block size. The conventional IPv4 host count treats /31 point-to-point blocks and /32 host routes specially; IPv6 addresses are not reduced by the IPv4 network/broadcast subtraction.
Assumptions and limitations
For IPv4 prefixes /31 and /32, the conventional subtraction rule does not describe point-to-point use or a single host route. IPv6 address count is shown without subtracting network and broadcast addresses.
Frequently asked questions
Why are /31 and /32 IPv4 prefixes handled differently?
RFC 3021 permits both addresses in a /31 point-to-point subnet to be endpoints; a /32 denotes one host route. Neither uses the ordinary network/broadcast subtraction.
Why is the IPv6 address count not reduced by two?
IPv6 does not apply the IPv4 network/broadcast subtraction. The page reports 2^(128 − prefix) IPv6 addresses and keeps IPv4 host-count conventions separate.
How do I use the CIDR usable host count calculator?
Enter CIDR prefix length, Address family (4 or 6). Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of CIDR usable host count?
A /24 block contains 256 IPv4 addresses; under the common subnet convention, 254 are host addresses.
What does the CIDR usable host count calculator calculate?
Estimate addresses in an IPv4 CIDR block and the conventional assignable host count.
Read the calculation methodology and privacy policy.
Source: RFC 4632: Classless Inter-domain Routing.
Source: RFC 3021: 31-Bit Prefixes on IPv4 Point-to-Point Links.