Part of the Technology & IT suite · 35 calculators

IP Address Count Calculator

How many addresses a CIDR prefix or an address range contains, and how many prefixes it takes to cover a given host count.

Every CIDR prefix is a power of two: a /24 is 256 addresses, a /23 is 512, a /25 is 128.

Results update as you type
Results
Addresses in the prefix
1,024
Usable hosts
Prefix needed for those hosts
Addresses in that prefix
Addresses left spare
Addresses in the range
Equivalent /24 blocks
Share of all IPv4
Reviewed September 2026. Computing arithmetic: bytes, bits, seconds and probabilities do not change by country. Australian broadband speeds are quoted in megabits per second (Mbps).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About ip address count

How the ip address count calculator works

Every CIDR prefix is a power of two: a /24 is 256 addresses, a /23 is 512, a /25 is 128. Counting a range is subtraction plus one.

The direction people actually need is the reverse — "I have 900 hosts, what prefix do I need?" — which is the smallest power of two that covers them plus the two reserved addresses. Nine hundred hosts needs a /22, because a /23 gives only 510.

Formula: addresses = 2^(32 − prefix)

Worked examples

InputsAddresses in the prefixNote
A /22 for 900 hosts1,0241,022 usable — a /23 would not fit
A /24256254 usable
A /816,777,21616.7 million addresses

Frequently asked questions

How many addresses in a /24?

256, of which 254 are usable.

What prefix do I need for 900 hosts?

A /22. A /23 gives 510 usable, which is not enough, so the next size up is the answer.

Why is it always a power of two?

Because a prefix is a fixed number of leading bits; the rest are free, and n free bits give 2ⁿ combinations.

Can I use a range that is not a prefix?

For counting, yes. For routing, no — routes are advertised as prefixes, so an arbitrary range has to be decomposed into several.

How much of IPv4 is a /8?

One 256th — about 0.39%. There are only 256 of them, which is why they were exhausted.

Where these figures come from

Last checked: September 2026. Units follow the SI decimal convention (IEC 80000-13 defines the binary alternatives); network and security figures cite the defining standard.