Logo

MonoCalc

/

Supernet Calculator

Networking
Enter one CIDR network per line, or comma-separated. Minimum 2 required.

Strict: only succeeds when networks are perfectly contiguous (no gaps).

About This Tool

🌐 Supernet Calculator – CIDR Route Aggregation & Summarization

A supernet is a single, larger CIDR block that encompasses two or more smaller, contiguous network blocks. Supernetting — also called route summarization or prefix aggregation — is one of the most important techniques in modern networking: it shrinks routing tables, simplifies firewall rule sets, and makes IP address planning cleaner and more scalable.

This calculator applies the binary prefix aggregation algorithm to find the smallest single CIDR block that covers all supplied IPv4 or IPv6 networks. It also performs gap analysis, shows aggregation efficiency, and provides a visual binary breakdown of the prefix boundary.

What Is Supernetting?

Supernetting is the inverse of subnetting. Where subnetting divides a large block into smaller subnets, supernetting merges smaller subnets back into a larger, covering prefix. The result is a summary route — one routing table entry that replaces many individual entries.

Route Summarization

BGP, OSPF, and EIGRP engineers advertise one aggregate instead of dozens of individual /24s, reducing routing table churn.

Firewall / ACL Simplification

Replace a long list of individual network rules with one supernet prefix, making policy easier to read and manage.

ISP Address Planning

Aggregate customer-assigned blocks into provider-level announcements to minimize the global routing table footprint.

How the Algorithm Works

The supernet calculator implements the binary prefix aggregation algorithmin four steps:

  1. Convert each input network to its binary network address (32 bits for IPv4, 128 bits for IPv6) and its prefix length.
  2. Sort all networks by their binary address value.
  3. Compare the binary representations from the most-significant bit to find the longest common prefix shared by all network addresses.
  4. The supernet prefix length equals the number of shared leading bits. The supernet network address is those bits followed by all zeros.

Example — four /24s summarized into one /22:

10.0.0.0/24

→ 00001010.00000000.00000000.xxxxxxxx

10.0.1.0/24

→ 00001010.00000000.00000001.xxxxxxxx

10.0.2.0/24

→ 00001010.00000000.00000010.xxxxxxxx

10.0.3.0/24

→ 00001010.00000000.00000011.xxxxxxxx

Supernet: 10.0.0.0/22 (22 common leading bits)

Best-Fit vs. Strict Contiguous Mode

The calculator offers two aggregation modes:

  • Best-Fit (default) — finds the smallest single CIDR block that covers all input networks, regardless of whether gaps exist between them. Use this for firewall rules where you want one rule to match a range of addresses.
  • Strict Contiguous — only accepts input sets where every network is the same prefix length and all networks together exactly fill the supernet without any gaps. This is the technically correct form of CIDR aggregation for routing protocols that require clean summarization.
Strict mode tip
For strict aggregation, all input prefixes must be equal in length, contiguous, and form a power-of-two group (e.g., 2, 4, 8, or 16 networks). Two /25s merge cleanly into a /24; three /25s cannot form a strict aggregate.

Understanding the Outputs

Supernet CIDR

The smallest covering aggregate prefix in CIDR notation (e.g., 10.0.0.0/22).

Subnet Mask

The dotted-decimal form of the supernet mask, useful for older device configurations.

Wildcard Mask

The bitwise inverse of the subnet mask, used in Cisco IOS ACLs and OSPF configurations.

Aggregation Efficiency

Percentage of the supernet's address space covered by input networks. 100% = no gaps; lower means unclaimed space inside the supernet.

Gap Analysis

CIDR ranges inside the supernet not covered by any input network. Advertising the supernet would also claim these gap addresses.

Binary Breakdown

Visual 32-bit binary display where shared prefix bits are highlighted in blue and host bits shown as 'x', making the aggregation boundary easy to see.

IPv4 vs. IPv6 Supernetting

The calculator supports both IPv4 (32-bit addresses, prefix lengths /0–/32) and IPv6 (128-bit addresses, prefix lengths /0–/128). The algorithm is identical — binary prefix matching — but IPv6 uses BigInt arithmetic internally to handle the full 128-bit address space.

For IPv6, the compressed colon-notation supernet address is automatically formatted using the standard :: compression (RFC 5952). Common use cases include aggregating customer /48 or /56 allocations into a provider /32 announcement.

Validation and Edge Cases

The tool automatically handles several common edge cases:

  • Host bit correction — if you enter 192.168.1.5/24, the calculator auto-corrects it to 192.168.1.0/24 and notifies you.
  • Duplicate removal — identical networks are de-duplicated before calculation.
  • Overlap detection — networks fully contained within another are removed, since they don't affect the supernet boundary.
  • Mixed IPv4/IPv6 — switch the IP Version toggle to match your input; mixing address families in one calculation is not supported.

Practical Tips for Network Engineers

  • Always review the gap analysis before advertising a supernet in BGP. Gaps mean you'd attract traffic for address space you don't own.
  • Use aggregation efficiency as a sanity check: if it's below 50%, you may be summarizing too aggressively and should consider advertising more-specific prefixes instead.
  • For OSPF or EIGRP summarization, enable Strict mode to confirm your networks form a clean CIDR boundary before configuring the summary-address command.
  • The wildcard mask output can be pasted directly into Cisco IOS ACL statements: permit ip 10.0.0.0 0.0.3.255 any.

Frequently Asked Questions

Is the Supernet Calculator free?

Yes, Supernet Calculator is totally free :)

Can I use the Supernet Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Supernet Calculator?

Yes, any data related to Supernet Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a supernet?

A supernet (also called an aggregate route or summary route) is a single, larger CIDR block that covers two or more smaller, contiguous network blocks. Instead of advertising multiple individual routes, network engineers aggregate them into one supernet to reduce routing table size.

How does the Supernet Calculator work?

The calculator converts each input network to its binary representation, aligns them by network address, and finds the longest common leading-bit prefix shared by all networks. That common prefix becomes the supernet's prefix length, and the supernet address is those shared bits followed by all zeros.

What is the difference between Best-Fit and Strict Contiguous modes?

Best-Fit (default) finds the smallest single CIDR block that covers all input networks regardless of gaps — useful for firewall rules. Strict Contiguous mode only succeeds when the input networks are perfectly contiguous and of equal size, which is the technically clean form of CIDR aggregation required by some routing protocols.

What does aggregation efficiency mean?

Aggregation efficiency is the percentage of the supernet's address space that is actually covered by your input networks. For example, if you aggregate two /25 networks into a /24, efficiency is 100%. If there are gaps, efficiency will be lower, warning you that advertising the supernet would also claim uncovered IP space.

Can I use this calculator for IPv6 supernetting?

Yes. Switch the IP Version toggle to IPv6 and enter your IPv6 networks in CIDR notation (e.g., 2001:db8::/33). The calculator applies the same binary prefix aggregation algorithm to 128-bit addresses and supports prefix lengths from /0 to /128.

What are the gaps shown in the gap analysis?

Gaps are address ranges inside the supernet that are not covered by any of your input networks. If you advertise the supernet prefix in BGP or a firewall rule, traffic destined for those gap addresses would match the rule even though you didn't intend to cover them. The gap analysis helps you identify and plan for this extra address space.