CalcuAll.
A quick calculation, right here.

CalcuAlltor.

FREE ONLINE SCIENTIFIC CALCULATOR

0
Ready when you are.
English

IT & Digital

IPv4 Subnet Usable Hosts

Count conventional host addresses in an IPv4 subnet.

Let’s calculate.

Usage estimate

Count conventional host addresses in an IPv4 subnet.

Your result
—host addresses
Rounded to up to 2 decimal places.

EXPLORE THE FORMULA

IPv4 Subnet Usable Hosts

IT & Digital · FORMULA GUIDE

Your current calculation

The values and displayed result follow the calculator as you edit it.

CIDR network prefix
—
Your result—
This panel uses the calculator’s displayed, rounded result.

The formula

Conventional usable hosts = 2^(32 − prefix) − 2

Count conventional host addresses in an IPv4 subnet.

Variables and input conventions

prefix
CIDR network prefix (bits)

Understanding the relationship

An IPv4 address has 32 bits. The prefix fixes network bits, leaving 32 − prefix host bits. Two conventional address patterns are reserved.

Interpreting the result

This conventional network/broadcast subtraction applies only to prefixes /0 through /30. /31 point-to-point links and /32 host routes have different semantics and are intentionally rejected. The count does not imply public routability.

A worked example

A /24 has 256 addresses and 254 conventional usable host addresses.

A fixed reference example; it does not change with your inputs.

Assumptions and valid inputs

Prefix an integer from 0 to 30. Reserves one network and one broadcast address. Does not apply to /31 point-to-point links or /32 host routes, and does not claim every address is publicly routable.

Rounding and numerical precision

Conversions, transport, cooking and digital calculations use a private 640-significant-digit decimal context. Numeric inputs accept a decimal point or comma and scientific notation, up to 100 characters, with nonzero magnitude from 10⁻¹⁰⁰ to 10¹⁰⁰. Transport, cooking and digital tools additionally reject computed reference-unit results above 10¹⁰⁰. Integer products and combination counts are exact within that supported range; non-integer divisions may require rounding. This protects arithmetic, not input measurements, charging behaviour, cooking outcomes or network performance. Choose 0–8 decimal places for display and copying. Trailing zeros are omitted; very small values may round to zero. Display rounding does not change the underlying calculation. Finite-precision arithmetic is not symbolic exact arithmetic.

Accuracy of input data

Extra displayed decimals do not improve input accuracy. Measurement uncertainty, product variability and uncertain chosen rates are separate from rounding. This tool does not propagate measurement uncertainty. Check that its stated assumptions describe your situation.

References and further study

rfc-editor.org

RFC 3021 explains why /31 point-to-point addressing is an exception to conventional network/broadcast subtraction. CalcuAll intentionally limits this count to /0–/30; address availability is not a routing or security guarantee.

Related tools

Formula and worked example

Conventional usable hosts = 2^(32 − prefix) − 2

Reference example

A /24 has 256 addresses and 254 conventional usable host addresses.

When this calculation applies

This conventional network/broadcast subtraction applies only to prefixes /0 through /30. /31 point-to-point links and /32 host routes have different semantics and are intentionally rejected. The count does not imply public routability.

Background reference: rfc-editor.org. References explain the method or units; they do not certify this calculator.

Source scope: RFC 3021 explains why /31 point-to-point addressing is an exception to conventional network/broadcast subtraction. CalcuAll intentionally limits this count to /0–/30; address availability is not a routing or security guarantee.

For the derivation, input conventions and numerical limits, open .