IP Supernet Calculator
Inputs
| CIDR blocks | 192.168.0.0/24 192.168.1.0/24 |
|---|
IP Supernet Calculator
Enter a list of IPv4 CIDR blocks and find the smallest single supernet that covers all of them — the aggregated route used to summarize many subnets into one prefix.
Inputs
CIDR Blocks
Results
Enter a value to see results.
Aggregated Supernet
IP Supernetting
Supernetting is the practice of collapsing several adjacent IPv4 networks into a single, larger CIDR block. Where subnetting carves one network into many smaller ones by lengthening the prefix, supernetting does the opposite: it shortens the prefix so that one block stands in for a whole group. The result is called a supernet, an aggregate, or a summary route, and finding it is the everyday work behind a clean, compact routing table.
This calculator takes a list of CIDR blocks and returns the smallest supernet that still covers every address in the list. "Smallest" here means the block with the longest prefix — the one that wastes the least address space while still containing all of the inputs.
How the supernet is found
Every CIDR block describes a contiguous range of addresses. A block written as a.b.c.d/p holds addresses, starts at a base address that is a multiple of that size, and ends one address before the next aligned block begins. To aggregate a list, the calculator first reduces each input to its numeric range: the lowest network address across all blocks becomes the floor, and the highest broadcast address becomes the ceiling.
The supernet must be a valid CIDR block that contains the whole span from floor to ceiling. Two rules constrain it:
- Its size must be a power of two: addresses.
- Its base address must be aligned — a multiple of its own size.
The calculator walks prefixes from the longest (/32) toward the shortest (/0) and returns the first one whose aligned block fully contains the floor-to-ceiling span. Because longer prefixes are tried first, the answer is always the tightest possible fit.
A worked example
Take two adjacent networks, 192.168.0.0/24 and 192.168.1.0/24. Each holds 256 addresses. The first runs from 192.168.0.0 to 192.168.0.255, the second from 192.168.1.0 to 192.168.1.255. Together they form one contiguous range of 512 addresses, from 192.168.0.0 to 192.168.1.255.
A block of 512 addresses is a /23, since . The base address 192.168.0.0 is a multiple of 512 in the third and fourth octets, so it is properly aligned. The two /24 networks therefore aggregate exactly into 192.168.0.0/23:
No address space is wasted: the supernet contains precisely the addresses of the two inputs and nothing more. This is the ideal case, where the inputs already tile a single aligned block.
When the supernet covers more than you entered
Aggregation cannot break the power-of-two and alignment rules, so the answer sometimes spans more addresses than the inputs alone. Consider 172.16.5.0/24 and 172.16.6.0/24. Their combined span runs from 172.16.5.0 to 172.16.6.255 — 512 addresses. But that span does not start on a /23 boundary, because 172.16.5.0 is not a multiple of 512. The smallest aligned block that still covers both is the /22 block 172.16.4.0/22, which holds four times as many addresses:
This /22 also includes 172.16.4.0/24 and 172.16.7.0/24, which were never in the list. That is the unavoidable cost of summarization: to advertise a single prefix you may have to claim a slightly larger, aligned block. Network engineers weigh this trade-off when designing address plans, often laying out subnets on power-of-two boundaries precisely so that future aggregation stays tight.
Why aggregation matters
Routers advertise reachability one prefix at a time. In a large network, advertising every individual subnet floods neighbours with entries and inflates the routing table. Route aggregation replaces a cluster of specific routes with one summary route — the supernet — so a neighbour learns a single prefix instead of dozens. Smaller tables mean faster lookups, lower memory use, and more stable routing updates, since a flap inside the aggregate no longer ripples outward. This is why summarization is a foundational technique in BGP and in hierarchical enterprise designs.
The same arithmetic also helps when writing firewall rules, access-control lists, and address-management documentation: a single supernet is easier to read and maintain than a long list of adjacent blocks.
Related calculators
To go the other direction and split a block, or to inspect a single network's mask, range, and host count, use the Subnet (CIDR) Calculator. To count the addresses between two arbitrary endpoints and see whether they form one CIDR block, try the IP Address Range Calculator.
Frequently Asked Questions (FAQ)
What is a supernet?
A supernet is a single CIDR block that contains several smaller blocks. Where subnetting splits one network into many, supernetting does the reverse: it combines several adjacent networks into one larger prefix.
For example, 192.168.0.0/24 and 192.168.1.0/24 together occupy the same address space as 192.168.0.0/23, so /23 is their supernet. This calculator returns the smallest supernet — the one with the longest prefix — that still covers every block you enter.
How is this used in route aggregation?
Routers advertise the networks they can reach. When many adjacent subnets share an upstream path, advertising each one separately bloats the routing table. Aggregation replaces those entries with one summary route — the supernet — so neighbours learn a single prefix instead of dozens. Smaller routing tables mean faster lookups, less memory, and more stable updates, which is why aggregation is a core practice in BGP and large enterprise networks.
Why does the supernet sometimes cover more than the input blocks?
Every CIDR block holds a power-of-two number of addresses and starts on a boundary that is a multiple of its own size. The smallest block that covers an arbitrary set of inputs must satisfy both rules, so it can extend past the addresses you actually listed.
For instance, 172.16.5.0/24 and 172.16.6.0/24 are covered by 172.16.4.0/22, which also includes 172.16.4.0/24 and 172.16.7.0/24 even though they were not entered. Aggregation always rounds out to the nearest aligned power-of-two block.
What is the difference between a supernet and a subnet?
They are two directions of the same idea. Subnetting lengthens the prefix to divide one network into smaller pieces — a /24 becomes two /25s. Supernetting shortens the prefix to merge networks — two /24s become one /23. A shorter prefix always means a larger block. If you want to split a block instead of combining blocks, use a subnet calculator.