Usable IPv4 hosts in a conventional subnet

Use the inputs below to calculate «Usable IPv4 hosts in a conventional subnet»: IPv4 prefix length. Use consistent units and check the assumptions.

My calculators

Changes number formatting only, not currency, units or country-specific rules.

Result254

Compare scenarios

Save up to four scenarios temporarily on this page. Inputs are not stored or sent to the server by this feature. The comparison disappears when you reload or leave the page.

Use the browser print dialog to save the current result and comparisons as PDF if supported. No file is uploaded.

How to use this calculator

Enter the following values:

The result updates automatically as you change the inputs. Use the example below to check the calculation.

Practical considerations

A conventional IPv4 subnet with prefix /p has 2^(32−p) addresses. Subtract the network and broadcast addresses for a usable host count. This calculator accepts /0 through /30 only; /31 point-to-point links and /32 host routes have different semantics. The count is theoretical and does not exclude reserved address ranges.

Formula

((2 ^ (32 − prefix)) − 2)

Use the units shown; monetary values use the same currency throughout.

Worked example

IPv4 prefix length
24

Result: 254

Results are estimates; verify assumptions before making decisions.

Share and embed

The link and embed code contain no calculation inputs. The widget runs in the browser without ads or analytics.

Related calculators