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 /19 subnets

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, and prod
  • 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:

  • 8 subnets requires 3 subnet bits because 2^3 = 8
  • Add those 3 bits 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 /25 gives 126 usable hosts, which is too small
  • A /24 gives 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:

  • /24 leaves 8 host bits
  • 2^8 = 256
  • 256 - 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:

  • 8 subnets requires 3 borrowed bits

Step 2:

  • /24 + 3 = /27

Step 3:

Each subnet increments by 32 addresses:

  • 192.168.0.0/27
  • 192.168.0.32/27
  • 192.168.0.64/27
  • 192.168.0.96/27
  • 192.168.0.128/27
  • 192.168.0.160/27
  • 192.168.0.192/27
  • 192.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 2 borrowed 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:

  • /26 is too small with 62 usable hosts
  • /25 fits 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:

  1. Start with the original prefix.
  2. Decide whether the problem is subnet-count-driven or host-count-driven.
  3. Find the new prefix.
  4. Calculate the block size.
  5. List each subnet boundary.
  6. 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:

CIDR to IP Range Calculator

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:

Cloud Usable IP Calculator

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
  • /31 treated as 2 usable addresses
  • /32 treated 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:

Usable IP Calculator