Skip to content
SoftwareSolutions.net
Calculators & Converters

Subnet calculator

Find the network, broadcast and usable host addresses for an IPv4 subnet.

Try it

Ready

Inputs

Result

The result appears here as you type.

About Subnet calculator

A subnet calculator works out the network details of an IPv4 address from its prefix length, which is written after a slash in notation such as 192.168.1.130/26. Enter the address and the prefix, and the tool returns the network address, the broadcast address, the first and last usable hosts, the subnet mask and the number of usable hosts. Network engineers use these figures to design and troubleshoot local networks.

An IPv4 address has 32 bits. The prefix length says how many of those bits identify the network, and the rest identify hosts within it. Changing the prefix by one bit doubles or halves the number of addresses, which is why subnetting is a common task when dividing a network into smaller parts.

How to use Subnet calculator

  1. Enter the IPv4 address in dotted decimal form, such as 192.168.1.130.
  2. Enter the prefix length as a number from 0 to 32, without the slash.
  3. Read the network address, which is the lowest address in the block.
  4. Read the broadcast address and the first and last usable hosts for devices.

How the mask and network are found

The subnet mask has the prefix length in ones followed by zeros. A /26 prefix gives the mask 255.255.255.192. Applying the mask to the address with a bitwise AND gives the network address, so 192.168.1.130 belongs to the network 192.168.1.128.

The broadcast address sets all the host bits to one. For the /26 network above, that is 192.168.1.191. The usable hosts run from 192.168.1.129 to 192.168.1.190, because the first and last addresses are reserved for the network and broadcast.

The number of usable hosts is two to the power of the host bits, minus two. A /26 has six host bits, so it has 62 usable addresses. The rule changes for /31 and /32, which are used for point-to-point links and single hosts.

Designing a network

Plan subnets for the number of devices you expect to grow to, not just today's count. A subnet that is too small forces a redesign later, which can disrupt every device on it.

Private address ranges such as 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for internal use. Use them for your local networks, and avoid overlap if you plan to connect several sites together.

Document each subnet with its purpose, the prefix and the range. A clear record makes troubleshooting faster, and it stops two teams from assigning the same addresses to different devices.

Check the result by counting the addresses. A /26 block holds 64 addresses in total, so the first usable host plus 61 more should land on the last usable host before the broadcast. Doing this quick check catches most arithmetic slips before they reach a live network.

Frequently asked questions

What does /24 mean?

It means the first 24 bits identify the network, leaving 8 host bits. A /24 has 254 usable hosts and the mask 255.255.255.0.

Why are two addresses reserved?

The lowest address names the network itself and the highest is the broadcast address for all hosts, so neither can be given to a device.

Does this work for IPv6?

No. This tool handles IPv4 only. IPv6 uses 128-bit addresses and different rules for subnetting.

Related tools

Tools that pair well with this one.