SupperTools

Useful Online Tools & Utilities to Make Everyday Tasks Easier.

IP Subnet Calculator for IPv4 and IPv6 Network Planning

Work out network and broadcast addresses, usable host ranges and host counts for IPv4 and IPv6 subnets, and compare prefix lengths before you configure.

Dividing an IP network into subnets by hand means converting addresses to binary, counting borrowed bits, and hoping you did not slip a digit somewhere along the way. The IP Subnet Calculator does that arithmetic for you: give it an address together with a prefix length or subnet mask, and it works out the network address, the broadcast address, the usable host range, and how many hosts the subnet can hold, for both IPv4 and IPv6.

How Subnetting Splits an Address

An IP address has two parts: the network portion, which identifies the subnet, and the host portion, which identifies a device inside it. The prefix length, written as a slash followed by a number such as /24, states how many bits belong to the network part. The more bits you take for the network, the more subnets you can create, but the fewer addresses remain for hosts in each one. A subnet mask expresses the same split in dotted decimal, so 255.255.255.0 and /24 describe the same boundary. The calculator applies that boundary to your address to find the first address of the block (the network address), the last address (the broadcast address in IPv4), and the usable range in between.

IPv6 follows the same principle with far larger numbers: a typical /64 subnet contains more addresses than anyone could assign, so IPv6 planning focuses on clean prefix boundaries rather than conserving hosts. The calculator handles both families, so you can check a home network one minute and a data centre IPv6 plan the next. If you first want background on an address itself rather than its range, our IP Information tool explains what an address belongs to.

What the Calculator Works Out for You

  • Network address, the first address of the block, which names the subnet itself.
  • Broadcast address for IPv4, the last address, reserved for messages to every host in the subnet.
  • Usable host range, the first and last addresses you can actually assign to devices.
  • Total and usable host counts, so you can check a design against the number of devices you need to support.
  • Both address families, covering IPv4 prefix or mask input and IPv6 prefix planning in one place.

How to Calculate a Subnet

  1. Enter the IP address you want to analyse, for example an address from your router, server, or network plan.
  2. Provide the prefix length or subnet mask that goes with it, such as /24 or 255.255.255.0.
  3. Click Calculate and review the network address, broadcast address, and first and last usable host addresses.
  4. Check the total and usable host counts against the number of devices you need to support.
  5. Repeat with a different prefix length if you are comparing design options, and note the option that fits before you configure anything.

Worked Example: Splitting One Office Network into Four

Imagine a small office starting with the private block 192.168.10.0/24 and needing separate subnets for staff computers, a guest wireless network, printers and servers, and a handful of security cameras. One /24 holds 256 addresses, and borrowing two more bits, moving to /26, divides it into four equal subnets of 64 addresses each, 62 of them usable per subnet. The calculator gives you the four ranges directly: 192.168.10.0/26 covers .0 to .63 with usable hosts .1 to .62; 192.168.10.64/26 covers .64 to .127 with usable hosts .65 to .126; 192.168.10.128/26 covers .128 to .191 with usable hosts .129 to .190; and 192.168.10.192/26 covers .192 to .255 with usable hosts .193 to .254. Assign staff to the first, guests to the second, printers and servers to the third, and cameras to the fourth. Each group now has room for about sixty devices, its own broadcast address (the last address in each range), and clean boundaries for firewall rules between them. When devices in the new ranges are live, a ping test can confirm they respond as expected.

Planning Tips and Subnetting Mistakes to Avoid

The most common error is forgetting that in IPv4 the network and broadcast addresses are not assignable to devices, so a /24 offers 254 usable hosts, not 256. Another is setting a mask on one device that differs from the rest of the subnet, which produces intermittent, confusing connectivity: a server configured with /24 on a network everyone else treats as /26 will believe distant local addresses are directly reachable and never send them to the gateway. Take care, too, when a provider assigns you a small block such as a /29, where the usable range is tiny and one mistyped gateway address consumes a large share of it. The surest way to catch trouble early is to compare boundaries: calculate both ranges whenever you add a subnet, because if the network address of one falls between the network and broadcast addresses of another, they overlap and will conflict. Finally, write the plan down. A short note of each subnet's purpose saves hours when you revisit the network months later, and resolving the names involved is easier with our Hostname to IP tool.

Subnet Questions People Ask Most

What is the difference between a subnet mask and a prefix length?

They describe the same split in different notation. The prefix length counts the network bits, so /24 means 24 network bits; the mask writes those bits out as 255.255.255.0 for IPv4. Use whichever form your equipment or provider gives you.

Why does a subnet have fewer usable hosts than total addresses?

In IPv4, the first address names the network itself and the last is reserved for broadcast messages to all hosts, leaving the addresses between them for devices. IPv6 has no broadcast address, but the calculator still shows you the full range boundaries for planning.

Can I use this for planning before I change my router settings?

Yes, and that is the safest way to work. Run the numbers first, confirm the ranges do not overlap with existing subnets, and only then apply the settings to your router, firewall, or server.

How can I tell whether two subnets overlap?

Calculate both ranges and compare their boundaries. If the network address of one falls between the network and broadcast addresses of the other, they share addresses and will conflict. Non-overlapping subnets have entirely separate ranges.

How many subnets does borrowing two bits create?

Each borrowed bit doubles the number of subnets, so borrowing two bits from the host portion creates four subnets, each with one quarter of the original addresses. Borrowing three bits creates eight smaller subnets, and so on.

Plan the Ranges Before You Touch a Router

Most subnetting pain comes from arithmetic slips and undocumented ranges rather than from difficult concepts. A calculator removes the slips: you see the network, broadcast, and usable boundaries in one pass and can test design options before a single device is reconfigured. Plan on paper, verify the counts, then configure, and the network you document today stays understandable years from now.

Related Tools