Subnet Calculator
Use this subnet calculator to split an IPv4 network into smaller subnets and sanity-check the results before you put them into routers, firewall objects, VLAN plans, or lab exercises.
You can divide a network by:
- Number of subnets
- Hosts per subnet
The tool then returns the resulting subnet ranges with:
- Network address
- First usable IP
- Last usable IP
- Broadcast address
- Usable host count
It is built for two real-world workflows:
- You already know how many equal-size subnets you need and want the new prefix quickly
- You know the minimum host count per subnet and want the smallest prefix that still fits comfortably
What This Subnet Calculator Does
This is a classic IPv4 subnetting tool for equal-size subnet splitting.
It helps with common networking tasks such as:
- Breaking a larger network into smaller subnets
- Planning lab environments
- Checking subnet masks and broadcast ranges
- Studying subnetting for certification work
- Validating how many hosts fit inside a subnet
- Creating repeatable subnet plans before equipment or cloud resources are deployed
If you enter:
10.0.0.0/16- split by
8 subnets
the calculator returns the resulting /19 networks.
If you enter:
10.0.0.0/16- split by
200 hosts per subnet
the calculator finds the smallest subnet size that supports that host requirement and lists the resulting subnets.
That makes it useful for both learning and operations work. Many subnet calculators stop at a single mask conversion. This one is more helpful when you need to answer, “What does the whole split actually look like?”
Split by Number of Subnets
Use this mode when you know how many subnets you need.
Example:
- Base network:
10.0.0.0/16 - Required subnets:
8
Result:
- 8 equal-size
/19subnets
This is useful for:
- Dividing a larger allocation across sites or teams
- Creating equal-size VLAN or lab segments
- Checking how many subnet bits are required
- Reserving one subnet per environment such as
dev,test,stage, andprod - Turning a larger parent allocation into a plan someone else can implement without redoing the math
CCNA-style explanation
If you start with 10.0.0.0/16 and need 8 subnets:
8subnets requires3subnet bits because2^3 = 8- Add those
3bits to the original/16 - New prefix =
/19
That gives you:
- 8 equal-size subnets
- 8192 total IPs per subnet
- 8190 usable hosts per subnet
This is the exact type of subnetting logic used in CCNA and other network certification questions.
In production, this same logic shows up when you inherit a larger address block and need to carve it into predictable chunks. Equal-size subnetting is often easier to document, easier to summarize in runbooks, and less error-prone than ad hoc allocations.
Split by Hosts per Subnet
Use this mode when you know how many hosts each subnet must support.
Example:
- Base network:
10.0.0.0/16 - Hosts per subnet:
200
Result:
- The smallest matching equal-size subnet
- All resulting subnet ranges inside the base network
This is useful when planning:
- Office subnets
- Training labs
- Device segments
- Server or VM ranges
- Small branch networks
- Segments where you know approximate device count but not final IP assignments yet
CCNA-style explanation
If you start with 10.0.0.0/16 and need 200 hosts per subnet:
- A
/25gives 126 usable hosts, which is too small - A
/24gives 254 usable hosts, which is large enough
So the smallest valid subnet is:
/24
That means the calculator will divide the /16 into many /24 networks.
This is the classic exam pattern:
Find the smallest subnet that supports the required host count.
In real environments, it is usually worth taking the next larger prefix if you expect growth, DHCP reservations, monitoring appliances, printers, IP phones, or future segmentation. Teams often choose the mathematically smallest subnet and then discover they designed for the first week instead of the next two years.
How to Think About Subnetting Quickly
Most subnetting questions can be solved with two rules:
Rule 1: More subnet bits = more subnets
If you borrow bits from the host portion:
- you create more subnets
- each subnet gets smaller
Formula:
2^(borrowed bits) = number of subnets
Rule 2: Fewer host bits = fewer usable hosts
Formula:
2^(host bits) - 2 = usable hosts
Example:
/24leaves8host bits2^8 = 256256 - 2 = 254 usable hosts
That is why /24 supports 254 usable addresses in classic IPv4 subnetting.
The shortcut is handy, but the operational lesson matters more:
- Borrowing more bits creates more subnets
- Leaving more host bits creates room for mistakes, growth, and temporary devices
Most subnetting failures are not math failures. They are planning failures caused by choosing a prefix with no slack.
Where Engineers Usually Get This Wrong
Most subnet mistakes happen in one of these situations:
- Treating the requested host count as the final host count instead of the minimum
- Forgetting that infrastructure devices also consume addresses
- Mixing equal-size subnetting with a plan that really needs variable-length subnetting
- Copying a lab-sized subnet plan into a production network
- Choosing a prefix that fits today but blocks future VLAN growth
If the answer you get feels “surprisingly tight,” it usually is.
As a rule of thumb:
- If a subnet will stay small and static, the minimum valid prefix can be fine
- If humans, servers, or workloads will accumulate over time, choose the next larger block
Worked Example: Split a /24 into 8 Subnets
This is one of the most common subnetting practice questions.
Given:
- Network:
192.168.0.0/24 - Required subnets:
8
Step 1:
8subnets requires3borrowed bits
Step 2:
/24 + 3 = /27
Step 3:
Each subnet increments by 32 addresses:
192.168.0.0/27192.168.0.32/27192.168.0.64/27192.168.0.96/27192.168.0.128/27192.168.0.160/27192.168.0.192/27192.168.0.224/27
Each /27 subnet gives:
- 32 total IPs
- 30 usable hosts
That pattern is worth memorizing because it appears constantly in subnetting exercises.
It also shows why subnet boundaries matter. Once you know the block size is 32, every subnet starts at a multiple of 32 in the last octet. That same block-size pattern is what helps you quickly spot bad firewall ranges and overlapping VLAN definitions.
Worked Example: Smallest Subnet for 50 Hosts
Given:
- Host requirement:
50
You test common subnet sizes:
/27= 30 usable hosts/26= 62 usable hosts
So the smallest valid subnet is:
/26
That means:
- subnet mask =
255.255.255.192 - block size =
64 - usable hosts =
62
This is another very common certification-style subnetting pattern.
In operations work, this pattern is especially useful when someone says, “We need a network for about 50 devices.” The safe follow-up question is whether that means:
- 50 devices today
- 50 devices at steady state
- 50 devices plus printers, access points, controllers, and spare room
Those are not the same subnet.
Practical Examples Outside Certification Study
Example: Splitting a /20 for four sites
Suppose you receive 10.20.0.0/20 for a regional deployment and need one equal-size subnet per site.
- 4 sites requires
2borrowed bits /20 + 2 = /22
That yields four /22 networks, each with 1022 usable hosts.
This is a much better plan than handing out random /24 blocks because:
- every site gets the same capacity
- documentation stays simple
- summarization remains predictable
Example: Choosing a subnet for 120 hosts
If a team expects around 120 clients:
/26is too small with 62 usable hosts/25fits with 126 usable hosts
Mathematically, /25 is correct.
Operationally, you should still ask whether growth, guest access, phones, printers, or IoT devices could push the subnet past that limit. If yes, a /24 may be the better design even though it is not the smallest valid answer.
Subnetting Practice Tip
When practicing manually, remember this sequence:
- Start with the original prefix.
- Decide whether the problem is subnet-count-driven or host-count-driven.
- Find the new prefix.
- Calculate the block size.
- List each subnet boundary.
- Identify first usable, last usable, and broadcast.
The calculator above is useful both for solving the problem and checking your manual work after you finish.
It is also useful for peer review. If someone proposes a prefix or subnet count that feels off, you can verify the full output in seconds and see every resulting range instead of trusting mental math alone.
Subnet Calculator vs CIDR Range Calculator
This page is for subnet splitting.
If you already have a CIDR block and only want to see its details, use:
That tool is better for:
- Checking one existing subnet
- Viewing subnet mask and wildcard mask
- Seeing total IPs and usable hosts for a single CIDR
If you need cloud-specific usable counts rather than classic IPv4 host math, use:
Azure, AWS, and Google Cloud reserve platform IPs inside each subnet, so the usable host count is lower than classic subnetting suggests.
When This Calculator Is Not Enough
This page assumes classic equal-size IPv4 subnetting.
You may need a different tool or a different design approach when:
- You are planning Azure, AWS, or Google Cloud subnets with provider-reserved IPs
- You need variable-length subnetting rather than equal-size splits
- You are sizing Kubernetes node, pod, or service ranges
- You are working with IPv6
For those cases, continue with:
Why This Matters in Production
Bad subnet plans usually do not fail immediately.
They fail later when:
- a site grows
- a new VLAN is needed
- a firewall object has to be expanded
- a migration needs temporary overlap-free space
- a team discovers there is no contiguous room left
That is why a subnet calculator is useful, but the real value is choosing a structure that remains easy to operate six months later.
Subnetting Notes
This calculator uses classic IPv4 subnetting rules:
- Network address reserved
- Broadcast address reserved
/31treated as 2 usable addresses/32treated as a single address
Cloud platforms reserve additional IPs inside subnets, so cloud usable counts will be lower than classic subnetting tables suggest.
For cloud-aware usable capacity, use: