Calculator Need
Categories

Text, Web & Developer Tools

IP Subnet Calculator

Network, broadcast, mask and usable hosts for an IPv4 subnet. Enter an address and a CIDR prefix to see the full subnet breakdown.

Formula: usable hosts = 2^(32 − prefix) − 2. Network = IP AND mask; broadcast = network OR wildcard.

How to use the IP subnet calculator

  1. Type an IPv4 address, for example 192.168.1.10.
  2. Pick the CIDR prefix, for example /24.
  3. Press “Calculate subnet” to see the network, broadcast, mask and host range.

IP subnet calculation example

192.168.1.0/24 has a subnet mask of 255.255.255.0, 256 addresses and 254 usable hosts (192.168.1.1 to 192.168.1.254). The broadcast address is 192.168.1.255.

Tips for using the IP subnet calculator

  • Each extra bit in the prefix halves the subnet: /25 gives 126 usable hosts, /26 gives 62.
  • Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
  • /30 subnets (2 usable hosts) are common for point-to-point links; /31 is also used on modern routers.

IP subnet calculator: common questions

What is a CIDR prefix?
The number after the slash counts how many of the 32 address bits belong to the network. /24 means the first 24 bits are the network and the last 8 bits are hosts — 256 addresses.
Why are 2 addresses subtracted from the host count?
The network address itself and the broadcast address cannot be assigned to a device, so usable hosts = 2^(32 − prefix) − 2. /31 and /32 are special cases with 2 and 1 usable addresses.
What is the wildcard mask?
The inverse of the subnet mask, used in access lists and some router rules. It is 255.255.255.255 minus the subnet mask.
Is my data stored?
No. The calculation runs in your browser.
How many hosts does a /23 have?
512 addresses, 510 usable.