Browser-based IP planning · every calculation runs here

Subnet Calculator with VLSM

Work out network, broadcast, usable range and wildcard for IPv4 and IPv6, split a block into equal subnets, plan VLSM from host counts, summarise routes into the fewest CIDR blocks, and find overlapping or duplicate networks. Tables export as CSV.

Address or network

A mask can be dotted (255.255.255.0) or a wildcard (0.0.0.255); a bare address is a /32 or /128. Leading zeros in an IPv4 octet are refused because some tools read them as octal.

Enter an IP address or CIDR block above and press Calculate.

Subnet Calculator and VLSM Planner

Operator: Abdulla Al Fahad. How tools are built and checked

Sales needs 60 hosts, engineering 28, guests 12, a management VLAN 5 and two WAN links 2 each, and all of it has to fit in 192.168.10.0/24. Enter the parent block and those six lines and the planner places them largest first: 192.168.10.0/26, .64/27, .96/28, .112/29, .120/30 and .124/30, with 192.168.10.128/25 left untouched.

The other modes cover the daily questions: network, broadcast, usable range, mask and wildcard for one address, an equal split of a block into smaller ones, and a list of networks collapsed into the fewest routes with overlaps and duplicates called out.

IPv4 and IPv6 both work, and every number is computed on exact integers, so a /48 of IPv6 shows its 1,208,925,819,614,629,174,706,176 addresses without rounding.

Key features

  • Calculator for IPv4 and IPv6 with mask, wildcard, first and last usable address, address type and reverse DNS zone
  • Accepts 10.1.2.3/24, 10.1.2.3 255.255.255.0, a wildcard such as 0.0.0.255, bare addresses and bracketed or zoned IPv6
  • Split a block into equal subnets of any longer prefix
  • VLSM plan from host counts (IPv4) or prefix lengths (IPv6), first fit into the free space, with what is left listed
  • Summarisation of a mixed list into the smallest exact set of CIDR blocks, plus the single covering block
  • Overlap and duplicate detection, and CSV export of every table

How the address maths is done

For IPv4 the usable range excludes the network and broadcast addresses, so a /24 has 254 usable hosts. A /31 has no broadcast and uses both addresses on a point-to-point link (RFC 3021), and a /32 is one host. IPv4 octets with leading zeros, such as 192.168.01.1, are refused because some tools read them as octal. The legacy class (A to E) and the address type, from private, shared (100.64.0.0/10), link-local, documentation and multicast ranges, are listed for context.

IPv6 has no broadcast address, so the whole block is usable. Addresses are written in the RFC 5952 form: lower case, no leading zeros, and the longest run of two or more zero groups, the first on a tie, shortened to ::. IPv4-mapped addresses print as ::ffff:192.0.2.1. A prefix longer than /64 triggers a note, because it breaks stateless address autoconfiguration on that link. The reverse zone is built from nibbles and is exact when the prefix is a multiple of 4.

Lists accept up to 20,000 networks, a split lists up to 4,096 subnets (the table shows the first 1,000), a VLSM plan up to 2,000 requests, and a line may hold several comma-separated CIDRs. Entries with host bits set, such as 10.0.0.77/24, are read as the network they belong to.

When to use it

  • A student checks 172.16.5.77/20 and gets network 172.16.0.0, broadcast 172.16.15.255, 4,094 usable hosts, mask 255.255.240.0 and wildcard 0.0.15.255.
  • An engineer has the routes 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/23, 10.0.0.128/25, and 192.168.5.0/24 twice. The page returns two routes, 10.0.0.0/22 and 192.168.5.0/24, and reports that 10.0.0.0/24 contains 10.0.0.128/25 and that 192.168.5.0/24 is listed twice.
  • A team keeps its requests in the order the departments asked and lists Big 100, Small 2, Mid 60, Tiny 2 for 192.168.10.0/24. The plan puts Big on .0/25, Small on .128/30 and Mid on .192/26, and then places Tiny on .132/30, in the space between Small and Mid.
  • A cloud architect splits 10.20.0.0/16 into /20 subnets and gets 16 of them, each with 4,094 usable addresses, ready to assign one per availability zone and tier.

Inputs

  1. Pick a mode: Calculator, Split, VLSM plan or Summarise and overlaps.
  2. Type the address or block, or the list, and press the action button; Enter works in the single-line fields.
  3. For VLSM, give one line per subnet as name, hosts needed, and choose largest first or the order you listed.
  4. Read the table, copy the CIDR, or download the CSV.

Worked example

VLSM plan: parent 192.168.10.0/24, one line per subnet

Sales, 60
Engineering, 28
Guest, 12
Mgmt, 5
WAN link A, 2
WAN link B, 2

Allocation, largest first

Sales         192.168.10.0/26     62 usable
Engineering   192.168.10.64/27    30 usable
Guest         192.168.10.96/28    14 usable
Mgmt          192.168.10.112/29    6 usable
WAN link A    192.168.10.120/30    2 usable
WAN link B    192.168.10.124/30    2 usable
Free: 192.168.10.128/25

Limits

Each subnet must start on a multiple of its own size, so in the order you listed a late, large request can find no aligned block even though enough addresses are free in total. The failure line gives the total left and the largest free range; switch to largest first when space is tight.

The single covering block can include far more than your list: 10.0.0.0/22 plus 192.168.5.0/24 are covered only by 0.0.0.0/0, and the page reports how many extra addresses that would take in. Use the exact summary for routes.

  • A request for 60 hosts needs 62 addresses, which rounds up to 64 and a /26; if you ask for 62 hosts the plan is the same, and 63 jumps to a /25.
  • Tick the /31 and /32 option for point-to-point links and loopbacks: two WAN hosts then take a /31 instead of a /30, which frees two addresses per link.

Common errors and how to fix them

"\"192.168.1\" is not a valid IPv4 or IPv6 address (an IPv4 address needs four parts)."
Write all four octets. Short forms such as 192.168.1 are accepted by some tools as 192.168.0.1, which is exactly why this page refuses to guess.
"255.0.255.0 is neither a subnet mask nor a wildcard mask: its 1 bits are not in one block."
A mask is a run of 1 bits followed by 0 bits, and a wildcard is the reverse. A pattern with a gap is not a valid network mask.

Best practices

  • Plan with the growth you expect rather than today's host count: re-planning a /26 into a /25 later means renumbering, while spare space inside the parent costs nothing.
  • Summarise only blocks that are contiguous in your design; aggregating across a gap advertises addresses you do not own.

How the VLSM allocator places subnets

Each request becomes a prefix: hosts plus two, rounded up to a power of two, then 32 minus that exponent. Requests are sorted by prefix, smallest number first (largest block first), with ties kept in the order you gave. Each request goes into the first free range that holds a block of its size starting on a multiple of that size, and the range is split around it. In the order you listed, a small subnet that comes late therefore fills a gap an earlier, larger block left behind; with largest first there are no gaps to fill.

If no free range can hold a request, it is reported as not fitting with the number of addresses left and the size of the largest free range; the others are still placed. Whatever is left, including any alignment gaps, is converted into the largest possible CIDR blocks and listed as free space.

How summarisation and overlap checks work

Networks are turned into address ranges, sorted, and merged when they overlap or touch. Each merged range is then cut into the fewest aligned CIDR blocks, which is why 10.0.0.0/24, 10.0.1.0/24 and 10.0.2.0/23 become one /22.

Overlaps are found in one sweep over the sorted list. Because CIDR blocks are either nested or disjoint, any overlap is a block containing another, or an exact duplicate. IPv4 and IPv6 are handled separately and reported under their own headings.

Frequently asked questions

Why does a /30 show 2 usable hosts but a /31 also show 2?

A /30 has four addresses, minus the network and broadcast addresses. A /31 has two addresses and, under RFC 3021, uses both on a point-to-point link with no broadcast address, so it gives the same two hosts in half the space.