Subnet by Host Count

Enter the number of hosts you need and it calculates the smallest matching subnet prefix, mask, and total address count. All calculations happen inside your browser.

Enter the number of hosts needed.

How to use

  1. Enter the number of hosts (devices) needed.
  2. Click "Calculate".
  3. Check the smallest matching prefix, mask, and address count.

Frequently asked questions

Why are usable hosts 2 fewer?

Each subnet cannot use its first address (network) or last address (broadcast) for real devices, so usable hosts is the total addresses minus 2.

How is the prefix chosen?

It calculates the smallest subnet (the largest prefix value) that accommodates all the hosts you entered.

Are the entered values sent to a server?

No. All calculations happen only inside your browser, and the values are never sent to or stored on any server.