Calculate & Convert

Subnet / CIDR

Network range, mask and host count from CIDR notation.

Enter values

The formula

hosts = 2^(32 − prefix) − 2

The number after the slash says how many leading bits identify the network; the rest address individual hosts. Two addresses in every block are reserved — the first names the network itself, the last is the broadcast address — which is why usable hosts is always two short.

All calculations run locally in your browser and update instantly as you type.

Example calculations

Common questions this calculator answers — select one to load its values.

Related calculators

Frequently asked questions

Why subtract 2 from host count?+
The first address is the network identifier and the last is the broadcast address, so neither can be assigned to a host.
All calculations run locally in your browser. Nothing you type is sent to a server.