Home › Everyday Tools › IPv4 Subnet Calculator

IPv4 Subnet Calculator

Enter an IPv4 address and a prefix length to get the network, broadcast, subnet mask and host range.

—

What is a subnet?

A subnet divides an IP network into smaller parts. An IPv4 address has 32 bits. The prefix length, written after a slash (CIDR notation), says how many of the first bits identify the network. In 192.168.1.10/24, the first 24 bits are the network and the remaining 8 bits identify hosts.

What the results mean

  • Network address: the first address of the subnet, with all host bits set to 0.
  • Broadcast address: the last address, with all host bits set to 1, used to reach every host.
  • Subnet mask: the same prefix written in dotted form, such as 255.255.255.0 for /24.
  • Usable hosts: 2(32 − prefix) − 2, because the network and broadcast addresses cannot be assigned to devices.

Common prefixes

/24 gives 254 hosts, /25 gives 126, /26 gives 62, /27 gives 30, /28 gives 14 and /30 gives 2, which is often used for point-to-point links.

The special cases /31 and /32 are used for point-to-point links and single hosts.

Frequently asked questions

What does /24 mean?

The first 24 bits are the network part. It is the same as the subnet mask 255.255.255.0.

Why are two addresses not usable?

One is the network address and the other is the broadcast address.

Does it support IPv6?

No. This tool is for IPv4 only.