IP Subnet Calculator

Enter an IPv4 address with CIDR notation (e.g. 192.168.1.0/24) or a separate subnet mask to get full subnet details.

Subnetting is one of those things that's simple once it clicks, and completely opaque until it does. Punch in an IP and a prefix length and this calculator gives you every detail you'd normally have to work out on paper or in your head.

A quick example

Say you're setting up a small office network. You've been assigned 192.168.10.0/24 by your ISP or IT team. That /24 gives you 256 addresses total, with 254 usable for hosts (the first is the network address, the last is the broadcast address).

Now your boss wants the sales team on a separate subnet from engineering. Split the /24 into two /25s: 192.168.10.0/25 and 192.168.10.128/25. Each gets 126 usable hosts. Plenty for a 40-person office with room to grow.

Need finer control? A /28 gives you 14 usable addresses. Perfect for a DMZ with a handful of servers, a printer VLAN, or a guest Wi-Fi segment you want to keep small and isolated.

Getting the most out of this

Enter the address in CIDR notation (like 10.0.0.0/16) for the quickest result. If you're working from a subnet mask instead, type the IP in the first field and the mask in the second. Both work the same way.

Use the common subnet masks table below the calculator as a reference when planning. It shows the mask, prefix length, and host count side by side, so you don't need to memorise the binary.

If you're studying for the CCNA or CompTIA Network+, try converting a few results by hand first, then check them here. It's a fast way to build the muscle memory for exam questions.

Frequently asked questions

What's the difference between CIDR notation and a subnet mask?

They describe the same thing in different formats. /24 and 255.255.255.0 both mean "the first 24 bits are the network portion." CIDR notation is shorter to write, which is why most modern documentation uses it. Older routers and Windows network settings still show the dotted-decimal mask.

Why do I lose two addresses from every subnet?

The first address in any subnet is the network address (identifies the subnet itself) and the last is the broadcast address (sends traffic to every host on the subnet). Neither one gets assigned to a device. On a /24, that means 256 total minus 2 equals 254 usable host addresses.

Does this work for IPv6?

This calculator handles IPv4 only. IPv6 subnetting follows similar logic but uses 128-bit addresses and a different notation style. For most home and small-office setups, IPv4 subnetting is still what you'll encounter day to day.

Enter as CIDR (e.g. 192.168.1.0/24) or just an IP address with the mask below.
Leave blank if using CIDR notation above.

Common Subnet Masks