What is a Subnet Calculator?
A subnet calculator splits an IPv4 network into smaller subnets and shows the details of each one: network address, usable host range, broadcast address, subnet mask and number of hosts.
This advanced calculator also plans equal-size subnets (FLSM) and different-size subnets (VLSM), and lets you divide or join any subnet. You can plan networks, VLANs and IP ranges without doing binary maths by hand.
How to use this subnet calculator
This calculator does subnetting, CIDR calculation, subnet mask to wildcard mask conversion, IP class detection, FLSM and VLSM. Pick what you need below. All examples use the network 192.168.1.0 with the mask 255.255.255.0 (/24).
1. Subnet details, CIDR and wildcard mask
Use this to see how many hosts a CIDR gives, and what the first and last IP are.
- Type an IPv4 address in IP Address.
- Add the Subnet Mask, or move the CIDR slider. The slider, the CIDR number and the subnet mask are linked, so when you change one, the other two change too.
- You see the result at once. You do not need to click anything.
IP Address 192.168.1.0
Subnet Mask 255.255.255.0 (/24)
2. Equal-size subnets (FLSM)
Use this when you want to split one network into subnets that all have the same number of hosts. Fill in one of the two boxes and click Calculate. The other box fills in by itself. If some part of the network is not used, it is shown in a separate Free/Unused IP Network table.
2a. You know how many subnets you need
Type a number in No. of Subnets and click Calculate. The calculator works out Minimum Hosts Per Subnet for you. In this example, 3 subnets need 4 equal blocks. The 4th block is not used, so it is shown as free.
IP Address 192.168.1.0
Subnet Mask 255.255.255.0
No. of Subnets 3
Minimum Hosts Per Subnet 62 (filled in)
2b. You know how many hosts each subnet needs
Type a number in Minimum Hosts Per Subnet and click Calculate. The calculator works out No. of Subnets for you. Subnet sizes are always a power of 2, so 50 hosts becomes a /26 block with 62 usable hosts.
IP Address 192.168.1.0
Subnet Mask 255.255.255.0
Minimum Hosts Per Subnet 50
No. of Subnets 4 (filled in)
All 4 blocks are used here, so there is no Free/Unused table.
3. Different-size subnets (VLSM)
Use this when each subnet needs a different number of hosts. Type the host numbers in Minimum Hosts Per Subnet, separated by commas, and click Calculate. You get one subnet for each number. No. of Subnets fills in by itself from your list. The biggest subnet is placed first, so nothing overlaps and the least space is wasted.
IP Address 192.168.1.0
Subnet Mask 255.255.255.0
Minimum Hosts Per Subnet 25,50,100
No. of Subnets 3 (filled in)
The numbers 100, 50 and 25 are placed biggest first: /25, /26 and /27. The space left over is shown as free.
4. Work with the result
- Each row in Subnet Details is one subnet. Free space is shown in its own Free/Unused IP Network table, and its rows carry on the numbering (Subnet 4, Subnet 5 and so on).
- Use Show Columns to hide the columns you do not need.
- Use Divide and Join to change any subnet. See step 5 below.
- Click Copy to copy the table. Click Download to save it as a CSV file for Excel or Google Sheets. Both include every row, with the free space under a Free/Unused IP Network line.
5. Divide and Join
Every row has a Divide and a Join button. Use them to change the result.
- Divide splits a subnet into two equal halves. For example, /26 becomes two /27.
- Join merges a subnet with its neighbour into one bigger subnet. For example, two /27 become one /26.
Example: in the 3-subnet result above, click Divide on Subnet 2. It splits into two /27 subnets and the names are numbered again. Click Join to put them back.
So with this one calculator you can do subnetting, subnet mask to wildcard mask conversion, IP class detection, FLSM and VLSM calculation.
Common mistakes
-
"These subnets need more addresses than the network has."
Use a shorter mask (a smaller CIDR number) or ask for fewer hosts.
-
No result for FLSM or VLSM.
Click Calculate after you fill in the split boxes.
-
The network in the result is different from what I typed.
The calculator always starts from the network address. For example,
192.168.1.77/24 gives 192.168.1.0/24.
Why use this subnet calculator?
Subnetting is the skill of cutting one IP network into smaller, right-sized networks. The rules are simple, but the binary maths behind them is slow and easy to get wrong, and one wrong bit gives overlapping ranges, wasted addresses or devices that cannot talk to each other. This calculator does that part for you, instantly and correctly, so you can spend your time on the design.
Get exact answers in seconds
Enter an address and a mask and you immediately see the network address, first and last usable IP, broadcast address, usable and total hosts, subnet mask and wildcard mask. No converting to binary, no counting bits and no off-by-one mistakes with the network and broadcast addresses.
Plan FLSM and VLSM in one place
As well as showing the details of one network, the calculator can split it:
- Equal subnets (FLSM): ask for a number of subnets or a number of hosts and get equal blocks.
- Different sizes (VLSM): type host counts like
100, 50, 25, 10 and each department gets a block of the right size, largest first, so nothing overlaps.
See the free space and avoid waste
Whatever is not used appears in its own Free/Unused IP Network table. You can see at a glance how much room is left for growth, a new VLAN or another site, instead of discovering later that you ran out of addresses.
Adjust the plan with Divide and Join
Plans change. If a team grows or a link needs only two addresses, you can Divide a subnet into two halves or Join it back with its neighbour, and the table updates straight away. You do not have to start again from scratch.
Check your work and learn
Students preparing for CCNA, Network+ and similar exams can solve a problem by hand and then confirm the answer. Moving the CIDR slider and watching the mask, host count and broadcast address change is also a fast way to understand how prefix lengths work. The FAQ below explains each term in plain language.
Document and share the result
Copy the table into a document or ticket, or Download it as a CSV file for Excel or Google Sheets. It includes every row and every column, so it works as your addressing plan or as evidence for a change request.
Free, private and works anywhere
There is nothing to install and no sign-up. The calculation runs in your browser, so the networks you type are not sent to our server. The page works on desktop, tablet and phone, in light and dark mode.
Who uses it
- Network and system administrators planning offices, VLANs, DMZs and router links.
- Cloud and DevOps engineers sizing VPC, VNet and Kubernetes subnets so ranges never clash.
- Helpdesk and support staff checking whether two devices are in the same subnet.
- Students and teachers practising and verifying subnetting exercises.
Example: one /24 for four teams
You have 192.168.10.0/24 and four teams that need 100, 50, 25 and 10 hosts. Type those numbers in Minimum Hosts Per Subnet and click Calculate. You get:
192.168.10.0/25 for 100 hosts (126 usable)
192.168.10.128/26 for 50 hosts (62 usable)
192.168.10.192/27 for 25 hosts (30 usable)
192.168.10.224/28 for 10 hosts (14 usable)
That leaves 192.168.10.240/28 free for future use. Doing this by hand means working out four masks and four boundaries and checking that they do not overlap, which the calculator does in a moment.
Tip: add some growth room to every host count, commonly 20 to 50 percent, so a subnet does not fill up the first time you add a few devices.
IPv4 Subnet Cheat Sheet – CIDR, Masks, Hosts & Classes
Quick reference for every prefix length from /0 to /32, plus IP address classes and private/special ranges. Usable hosts = total addresses minus network and broadcast (except /31 which has 2 usable and /32 which has 1).
Subnet masks from /0 to /32
IP address classes
Classes come from the first bits of the address. Modern networks use CIDR instead, but classes are still used in exams and in the IP Type column of this calculator.
Private, public and special IP ranges
Remember: a block is a valid subnet only if its first address is a multiple of its size. For example a /26 (64 addresses) can start at .0, .64, .128 or .192, but never at .50.