IPv4 subnet calculatorNetwork, host range, broadcast, mask and wildcard for any IPv4 blockIPv6 subnet calculatorPrefix ranges, /64 counts, splits and a ULA prefix generatorVLSM calculatorSize subnets by host count, with AWS, Azure, GCP and OCI rulesVisual subnet plannerSplit and join blocks, label them, then share or export the planCIDR and IP range calculatorTurn any start and end address into the fewest CIDR blocksSupernet and route summarySummarise networks into one route or merge them exactlyWildcard mask calculatorACL wildcards, matched ranges and ready Cisco linesSubnetting practiceExam-style questions, checked instantly with the working shownSubnet mask cheat sheetEvery prefix from /0 to /32 with mask, wildcard and hostsIPv6 cheat sheetPrefix sizes, address types and the reserved rangesGuidesHow subnetting works, explained with worked examples

VLSM calculator

List your subnets and how many hosts each needs. The calculator sizes each one, places the largest first, and shows exactly what is left, with the reservation rules of AWS, Azure, Google Cloud and Oracle built in.

Platform rules

Network and broadcast are reserved in each subnet.

Subnet nameHosts
NameNeedsSubnetMaskRangeUsableSpare

How the allocation works

Size each subnet

Add the reserved addresses to the host count and round up to the next power of two. 50 hosts plus 2 is 52, so the block is 64 addresses, a /26.

Sort largest first

Big blocks have the strictest alignment. Placing them first keeps every smaller block on a valid boundary.

Place them in order

Each block starts where the last one ended. Whatever remains is split into the fewest aligned free blocks.

Questions people ask

What is VLSM?
Variable length subnet masking means giving each subnet the prefix that fits its host count, instead of cutting a network into equal pieces. A 100-host LAN gets a /25 while a router link gets a /30, so far fewer addresses go to waste.
Why are the largest subnets allocated first?
A block of size N must start on a multiple of N. Placing the biggest blocks first keeps every later, smaller block aligned, so nothing overlaps and the free space stays in as few pieces as possible.
How many addresses do AWS, Azure, Google Cloud and Oracle reserve?
AWS reserves 5 addresses in every subnet (the first four and the last) and allows /16 to /28. Azure also reserves 5 and its smallest subnet is /29. Google Cloud reserves 4 (network, gateway, second-to-last and broadcast). Oracle Cloud reserves 3 (the first two and the last) and allows down to /30. Pick the platform above and the calculator applies these rules.
What does "spare" mean in the results?
Spare is the number of usable addresses left in a subnet after your requested hosts. It is room to grow. If spare is large, try a bigger request to see whether the next size down would be enough.
Can I share or export the plan?
Yes. The page link updates with your network, platform and every row, so copying it shares the whole plan. The CSV button downloads the allocation table for a spreadsheet or IPAM import.