Skip to content
Calixo

IP Subnet Calculator

Find the number of usable hosts and total addresses for a given CIDR prefix.

Inputs

Saved Scenarios

— select 2+ to compare

Usable Hosts

254

Total Addresses

256

Spark says

How it's calculated

Formula

Usable Hosts=2Host Bits2Usable\ Hosts = 2^{Host\ Bits} - 2
Host\ Bits
— 32 minus the CIDR prefix length

What is the IP Subnet Calculator?

A CIDR prefix (e.g. /24) determines how many bits of an IPv4 address are reserved for the network vs. host portion — this calculator converts a prefix into the resulting subnet's total and usable address counts.

How to use it

  1. 1 Choose the CIDR prefix (or equivalent subnet mask) you're working with.

Worked examples

Limitations

  • Subtracts 2 addresses for the network and broadcast address, the standard convention for /24 through /30. Point-to-point /31 and single-host /32 subnets use special conventions not covered here.

Frequently asked questions

Why subtract 2 from the total address count?

The first address in a subnet is reserved as the network address and the last as the broadcast address — neither can be assigned to a host.