Nexus Learn

IP subnet calculator

Enter an IPv4 address and a prefix length (like /24) or a subnet mask. See the network address, broadcast address, usable host range and number of hosts. Runs in your browser.

What is a subnet?

A subnet is a smaller network carved out of a bigger one. An IPv4 address has 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network. The remaining bits identify the hosts inside it.

How to read the results

  • Network address: the first address, which names the subnet. It cannot be given to a device.
  • Broadcast address: the last address, used to reach every host in the subnet.
  • Usable hosts: total addresses minus 2 (network and broadcast).
  • Wildcard mask: the subnet mask with the bits flipped. It is used in some router rules.

Quick rule: a prefix of /n gives 2(32 − n) addresses. So /24 gives 256 addresses (254 usable) and /26 gives 64 addresses (62 usable).

Common prefixes

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/30255.255.255.25242

Frequently asked questions

What are private IP addresses?

Addresses in 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are for use inside private networks such as your home or campus. They are not routed on the public internet.

Why are two addresses lost in every subnet?

The first is the network address and the last is the broadcast address. Neither can be assigned to a normal device.

More: computer networks MCQs · number base converter