cidrhelper.com Runs in your browser
One block → many subnets

Split a CIDR block into subnets

Divide a block into equal subnets, or size each one from a host count, VLSM-style. Every subnet listed with its mask, range, and broadcast.

Subnet splitter

An IPv4 block. Host bits are rounded down to the network address first.

Rounded up to the next power of two — equal subnets only come in 2, 4, 8, 16…

Split by

Enter a block and how to split it.
Subnets

The subnet table appears here — every block with its netmask, usable range, broadcast address, and host count.

Many blocks → fewest blocks

Aggregate CIDRs into the minimal set

Paste a list of blocks and addresses. Contained blocks disappear, aligned neighbours merge, and the output covers exactly the same addresses — never more.

One IPv4 block or bare address per line. A bare address is read as a /32.


Paste blocks above to collapse them.
Aggregated
The minimal covering set appears here, one block per line.
Input lines
Output blocks
Total addresses

How splitting works

A CIDR block splits by borrowing bits. The prefix length says how many bits at the start of the address are fixed; every bit you borrow from the host portion doubles the number of subnets and halves the size of each. Split a /24 one bit deeper and you get two /25s; two bits deeper, four /26s of 62 usable hosts each; three bits, eight /27s of 30. That is the whole mechanism, and it is also why you cannot have exactly three equal subnets — the counts only come in powers of two, so this page rounds a request for 3 up to 4 and says so.

The count and the size trade off exactly: subnets × addresses-per-subnet always equals the size of the block you started with. What the arithmetic does not hand you is the two addresses each subnet loses to its own network and broadcast address — split a /24 into four and 256 addresses become 4 × 62 = 248 usable hosts. More, smaller subnets always means fewer total hosts. To inspect any single block's mask, range, and host count — IPv6 included — use the CIDR calculator on the homepage.

VLSM, and why largest-first is the whole trick

Real networks rarely need equal subnets. A branch office might need a 100-host user LAN, a 50-host wireless segment, a 20-host management VLAN, and a 2-address point-to-point uplink. Equal splitting forces all four into the size the biggest one needs; VLSM — Variable Length Subnet Masking — gives each requirement the smallest subnet that fits it. For that example, carved out of 192.168.10.0/24:

  • 100 hosts192.168.10.0/25 — 126 usable, .1–.126
  • 50 hosts192.168.10.128/26 — 62 usable, .129–.190
  • 20 hosts192.168.10.192/27 — 30 usable, .193–.222
  • 2 hosts192.168.10.224/31 — both usable, per RFC 3021

That uses 226 of the 256 addresses and leaves 30 spare at the top of the block for whatever comes next. The order is not cosmetic. A subnet can only begin on a multiple of its own size: a /25 at .0 or .128, a /27 at any multiple of 32. Allocate the little /31 first and the /25 — which can now no longer start at .0 — gets pushed to .128, stranding most of the bottom half of the block as unusable slivers. Allocate largest-first and every block lands on an address that is already aligned for it, because everything placed before it was at least as big. Largest-first is what makes a VLSM plan gap-free, and it is the order this planner always uses; ties keep the order you typed.

Aggregation is alignment, not adjacency

Aggregation — also called supernetting or route summarisation — is splitting run backwards: take many blocks and find the fewest CIDRs that cover exactly the same addresses. Firewall rule lists, BGP announcements, and cloud security groups all reward it, because a hundred scattered entries that collapse to six are six entries to audit, six TCAM slots, six chances to fat-finger instead of a hundred.

The subtlety is that adjacency alone is not enough. 10.0.0.0/24 and 10.0.1.0/24 merge into 10.0.0.0/23 because that /23 starts on an aligned boundary and covers precisely those 512 addresses. 10.0.1.0/24 and 10.0.2.0/24 are just as adjacent, but no aligned /23 covers exactly that pair — so they stay two blocks. The aggregator here also swallows contained blocks (a /25 inside a listed /24 simply disappears) and cascades merges: two /24s become a /23, two /23s a /22, all the way up. What it never does is widen — the output covers the input exactly, which is the property that makes it safe to paste straight into a firewall.

Why this page is IPv4 only

IPv6 deliberately sits out both instruments. In IPv6 you never size a subnet from a host count, because every LAN is a /64 no matter how few hosts it has — SLAAC autoconfiguration depends on the 64-bit interface identifier. IPv6 planning is a different exercise: nibble-aligned prefix allocation inside the /48 or /56 your provider delegates, chosen for tidy DNS delegation and route hierarchy, not host arithmetic. Bolting IPv6 onto a VLSM calculator would produce plans nobody should deploy, so it is left out on purpose. The homepage calculator handles IPv6 blocks fine for what IPv6 actually needs: reading a prefix's range and size.

Common questions

Why did asking for 3 subnets produce 4?

Equal subnets of a CIDR block can only come in powers of two, because each subnet is made by fixing one more bit of the address. Splitting a /24 one bit deeper gives 2 subnets, two bits gives 4, three gives 8 — there is no way to cut it into exactly 3. The tool rounds up rather than down because "at least N networks" is the requirement people arrive with, and it reports both numbers so the rounding is visible.

What is VLSM?

Variable Length Subnet Masking: carving one block into subnets of different sizes, each sized to its actual host count, instead of forcing every subnet to be equal. A network with a 100-host LAN, a 20-host management VLAN, and a 2-host router link wastes most of a /24 if all three get a /26 — VLSM gives them a /25, a /27, and a /31 and leaves the rest of the block free for later.

Why are requirements allocated largest-first?

Alignment. A subnet can only start on an address that is a multiple of its own size — a /25 must start at .0 or .128, a /26 at .0, .64, .128, or .192. Allocating largest-first means every block lands on an address already aligned for its size, because everything placed before it was the same size or bigger, so the plan packs with zero gaps. Smallest-first fills the bottom with little blocks and then strands the big requirement against an alignment boundary, wasting everything in between.

Why won't 10.0.1.0/24 and 10.0.2.0/24 merge into one block?

A /23 must start on an even third octet, so the only /23s in the area are 10.0.0.0/23 and 10.0.2.0/23 — neither covers exactly those two /24s. Merging them into 10.0.0.0/23 would silently add 10.0.1.0's lower neighbour, 10.0.0.0/24, which was not in the input. Aggregation here never widens coverage: adjacent blocks merge only when the merged block is aligned, so those two stay as two.

How many hosts fit in each subnet size?

A subnet with prefix n holds 2^(32−n) addresses, minus two for the network and broadcast addresses — so a /26 holds 64 addresses and 62 hosts, a /27 holds 32 and 30. The exceptions are /31, where RFC 3021 makes both addresses usable for point-to-point links, and /32, a single host. The planner applies those exceptions, which is why 2 hosts get a /31 rather than a wasteful /29.

How many subnets can a /16 be split into?

Every borrowed bit doubles the count: a /16 makes 2 /17s, 256 /24s, or 16,384 /30s. The arithmetic is 2^(new prefix − old prefix). This page lists up to 1,024 subnets per split — beyond that a table stops being something anyone reads and starts being something that freezes a phone.

Why is this page IPv4 only?

Because IPv6 subnetting does not work by host count. Every IPv6 LAN is a /64 regardless of whether it has three hosts or three thousand — SLAAC address autoconfiguration requires it — so IPv6 planning is nibble-aligned prefix allocation inside a /48 or /56, not sizing subnets from requirements. Running host counts through these calculators for IPv6 would produce answers nobody should deploy. For a single IPv6 block's range and size, the calculator on the homepage handles both versions.