Subnet Calculator (CIDR): VLSM, Supernetting & CCNA Practice

Subnet Calculator (CIDR)

VLSM · supernetting · reverse prefix · binary mask view

Runs entirely in your browser — no address is ever sent to a server.

Any valid contiguous mask — auto-converts to/from CIDR
Finds the smallest prefix where 2ʰ − 2 ≥ required hosts

Subnet Requirements

Allocation is largest-requirement-first and boundary-aligned, so subnets never overlap.

Minimum 2 subnets — finds the smallest CIDR block covering all of them

Result

Enter an address and prefix to see the network, broadcast, usable range, wildcard mask and binary bit layout — or switch modes for reverse sizing, VLSM allocation and route summarization

Usable hosts = 2ʰ − 2, reserving the network and broadcast addresses (RFC 950). A /31 is a valid point-to-point link per RFC 3021 and a /32 is a single host route, so both show zero conventional usable hosts here. VLSM allocation aligns each subnet to its own size boundary and reports an error if the base block cannot hold all requirements. Supernetting returns the smallest prefix covering the full address span, which may include addresses beyond the listed subnets.


Subnet Calculator (CIDR): Standard, Reverse, VLSM and Supernetting in One Tool

Subnetting has four genuinely different problems hiding inside it, working out one subnet’s details, finding the smallest prefix that fits a required host count, splitting one network into several right-sized pieces for different departments and rolling several subnets back up into a single summary route. This tool handles all four in one place. Enter any address and prefix to see its full standard breakdown with a binary bit view, or switch modes to find a minimum prefix from a required host count, allocate a full VLSM calculator table across multiple department requirements without any overlap or summarize several subnets into the smallest CIDR block that covers them all, useful for both CCNA-style subnetting practice and real cloud VPC CIDR planning on AWS, Azure or GCP.


How to Use

This tool has four tabs: Standard, Reverse, VLSM and Supernet.

Step 1: Using Standard mode

  • Enter your IP Address.
  • Select Mask Input, either CIDR prefix (pick from /8 up to /32 in the dropdown) or Custom mask if you want to type a dotted-decimal mask like 255.255.255.192 directly, which the tool automatically converts to and from CIDR notation for you.
  • Tap Calculate Subnet. The result shows the network address, broadcast address, first and last usable host, total usable host count, the subnet mask and wildcard mask and a binary bit visualization shading network bits against host bits across all four octets, so you can see exactly where the boundary actually falls.

Step 2: Using Reverse mode

  • Switch to the Reverse tab and enter your Required Usable Hosts, the number of devices this subnet actually needs to support.
  • Optionally enter a Base Network address to see the resulting range applied to a real network.
  • Tap Find Minimum Prefix. The tool finds the smallest possible prefix, meaning the most address-efficient subnet, whose usable host count still meets or exceeds your requirement , and shows you exactly why one bit fewer would not have been enough.

Step 3: Using VLSM mode

  • Switch to the VLSM tab and enter your Base Network address and Base Prefix, the block you’re dividing up.
  • Tap Add Subnet for each department, floor, or VLAN you need to allocate space for and enter a name and required host count for each one.
  • Tap Allocate VLSM. The tool sorts your requirements largest-first and allocates each one to its own size-aligned boundary, so subnets never overlap, and shows a full allocation table with each subnet’s network, mask, usable range, broadcast and spare capacity. If your base block is too small to fit every requirement, it tells you clearly instead of allocating something invalid.

Step 4: Using Supernet mode

  • Switch to the Supernet tab and paste your list of subnets in CIDR notation, one per line, into the box, at least two are needed.
  • Tap Summarize Routes. The tool finds the smallest single CIDR block that covers every subnet in your list, useful for reducing the number of entries in a routing table.

Step 5: Exporting your result

  • Once you have a result in any tab, use Download CSV for the VLSM allocation table or the standard breakdown, Print / PDF for a clean printable copy or Copy to paste the figures elsewhere.

Key Features

  • Standard subnet breakdown with network, broadcast, usable range, wildcard mask and a full binary bit visualization across all four octets
  • Custom mask input that auto-converts freely between dotted-decimal masks and CIDR notation
  • Reverse mode finding the smallest, most address-efficient prefix for a required host count
  • VLSM allocation across multiple named subnet requirements, largest-first and boundary-aligned so allocations never overlap, with a clear error if the base block is too small
  • Supernetting / route summarization mode finding the smallest CIDR block covering a full list of subnets
  • Runs entirely in your browser, no address you type is ever sent to a server
  • CSV export for the VLSM allocation table, useful for network documentation
  • Genuinely useful for both CCNA subnet calculator style certification practice and real cloud VPC CIDR planning.

Formula / Logic Used

Usable Hosts

Usable Hosts=2h2,h=32prefixUsable\ Hosts = 2^h – 2, \qquad h = 32 – prefix

Two addresses are reserved per subnet, the network address itself and the broadcast address, per RFC 950. A /31 is treated as a valid point-to-point link per RFC 3021 and a /32 is a single host route, so both correctly show zero conventional usable hosts in this tool.

Network and Broadcast Address

Network=IP & Mask,Broadcast=Network  (Mask)Network = IP\ \&\ Mask, \qquad Broadcast = Network\ |\ (\sim Mask)

Reverse Mode: Minimum Prefix from Required Hosts

The tool searches host-bit counts starting from the smallest, and returns the first one where the usable host formula is satisfied:

2h2Required Hosts2^h – 2 \geq Required\ Hosts

VLSM Allocation (Largest-First, Boundary-Aligned)

Every subnet requirement is sorted by required host count, largest first. Each one is then assigned the smallest prefix that satisfies its own host requirement, aligned to its own natural address boundary, one after another, so no two allocations ever overlap:

Sort all requirements by required hosts, largest first
For each requirement, in that order:
    find its minimum prefix (same formula as Reverse mode)
    align it to the next available boundary for that size
    if it doesn't fit inside the base block, report an error

Allocating the largest requirement first is what actually minimises total wasted address space across the whole set.

Supernetting (Route Summarization)

For a list of subnets, the tool finds their overall lowest and highest address, then searches downward from /32 for the shortest prefix whose network address, once masked, matches for both that lowest and highest address:

Find the overall lowest and highest address across all listed subnets
Search prefixes from /32 down to /0
Return the first (longest) prefix whose masked network address covers both the lowest and highest address

The tool also flags whether this summary is an exact fit or includes some extra address space beyond just the subnets you listed, since a valid summary route sometimes has to cover a slightly wider range than the exact addresses given.


Who Should Use This Tool

Networking students and anyone preparing for CCNA, CompTIA Network+ or similar certifications who needs realistic subnetting, VLSM and supernetting practice with instant, verified answers. Also useful for network engineers planning real address allocation, department or VLAN subnetting, firewall ACL wildcard masks or CIDR block sizing for an AWS, Azure or GCP cloud VPC.


Frequently Asked Questions (FAQs)

1. How do I calculate the number of usable hosts in a subnet?

Usable hosts equal 2 raised to the number of host bits, minus 2, since the very first address in a subnet is reserved as the network address and the very last is reserved as the broadcast address. This tool calculates this automatically the moment you enter an address and prefix and also handles the special /31 and /32 cases correctly.

2. What is VLSM and why is it more efficient than giving every department the same subnet size?

VLSM, Variable Length Subnet Masking, lets you assign a different, right-sized subnet to each department or VLAN based on how many hosts it actually needs, instead of forcing every subnet in a network to be the same size. This tool’s VLSM mode allocates each requirement to its own size-aligned block, largest requirement first, which minimises the total address space wasted across the whole allocation.

3. What is supernetting, and how is it different from VLSM?

Supernetting is essentially the reverse operation, taking several individual subnets and finding the smallest single block that covers all of them, which is used to reduce the number of entries a router needs to keep in its routing table. This tool’s Supernet mode takes a list of subnets and returns that single summarizing CIDR block, while VLSM instead splits one big block down into several smaller, differently-sized ones.

4. How do I find the smallest subnet that fits a specific number of hosts?

Switch to Reverse mode and enter your required host count. This tool searches upward through the possible host-bit widths and returns the very first, smallest one that still satisfies 2 to the power of host bits, minus 2, being at least your required number, which is the most address-efficient subnet size for that requirement.

5. Can this tool be used for planning subnets in AWS, Azure, or GCP, not just for certification exam practice?

Yes, the same standard and VLSM calculations apply directly to designing CIDR blocks for a cloud VPC or VNet, since cloud providers use the exact same CIDR and subnetting rules as on-premises networking. The VLSM allocation table with CSV export is particularly useful for documenting how a larger CIDR block is being divided across multiple subnets or availability zones.


Related Tools

Read More>>>

Scroll to Top