FRIENDLY CALCULATOR · TECHNOLOGY, COMPUTING & AI

IPv4 Address and Host Calculator

Calculate usable IPv4 hosts and address capacity from a subnet prefix length.

Enter your values

Formula and method

For an IPv4 prefix /n, address count = 2^(32−n). Traditional usable-host count subtracts two network and broadcast addresses for prefixes /1 through /30; /31 and /32 have special point-to-point or host semantics.

Worked example

A /24 network contains 256 IPv4 addresses and traditionally 254 usable host addresses.

Important assumptions

This calculator provides a transparent estimate from the values you enter. Real systems can differ because of hardware, network conditions, provider pricing, software behavior, measurement definitions and operating limits. Check units and assumptions before using a result in production.

Values are processed in this browser. Do not enter passwords, API keys, private IP inventories or confidential business information.

Browse all calculators · Methodology · Disclaimer