EXCL

CIDR Exclude Calculator

Subtract IPv4 or IPv6 subnets from a parent CIDR and return the minimal remainder

IP & Routing
🔒 100% client-side — your data never leaves this page
Maintained by ToolsKit Editorial TeamUpdated: August 23, 2026Reviewed: August 23, 2026
CIDR SET DIFFERENCE

Uses exact BigInt arithmetic for IPv4 and IPv6, with up to 256 exclusions.

Minimal remaining CIDR set

The normalized, minimal, non-overlapping remainder will appear here.

About this tool

CIDR Exclude Calculator performs an exact set difference between one parent network and up to 256 contained IPv4 or IPv6 CIDRs. Overlapping and adjacent exclusions are merged first, then each remaining address interval is summarized into the smallest aligned CIDR list. BigInt arithmetic preserves all 128 IPv6 bits and the algorithm never enumerates individual addresses. Every exclusion must be fully contained by the parent; mixed IP versions and partial outside ranges are rejected instead of silently clipped.

Scenario Recipes

01

Prepare an allowlist after reserving internal ranges

Goal: Express the exact unreserved address space without hand-splitting CIDRs

  1. Enter the allocated parent CIDR and one reserved subnet per line.
  2. Calculate the difference and confirm excluded and remaining address counts.
  3. Review every output boundary before applying the minimal CIDR list to an ACL or route policy.

Result: A normalized, non-overlapping allowlist that excludes every reserved range exactly.

Frequently Asked Questions

Does the result include the smallest possible CIDR list?

Yes. Each remaining interval is summarized into maximal aligned blocks, producing a minimal exact cover.

Can exclusions overlap each other?

Yes. Overlapping and adjacent exclusion intervals are merged before the remainder is calculated.

Can I subtract IPv6 networks?

Yes. IPv4 and IPv6 are both supported with exact BigInt arithmetic, but one calculation cannot mix versions.

What happens when an exclusion is outside the parent?

It is rejected. The tool requires each excluded CIDR to be fully contained by the parent instead of clipping it.

Can an exclusion equal the parent CIDR?

Yes. The valid result is an empty remainder with zero remaining addresses.

Are the networks sent to a server?

No. Parsing, interval merging, subtraction, and CIDR summarization all run locally.

Keep browsing