CIDR Subtraction & Exclusion Tool

CIDR Subtraction & Exclusion Tool

Local Processing

Carve out an excluded CIDR block from a base subnet and compute the remaining non-overlapping CIDR pieces.

How It Works & Processing Standards

Carve out an excluded CIDR block from a base subnet and compute the remaining non-overlapping CIDR pieces.

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

Current Limits

  • Maximum input length: 100,000 characters

Firewall and routing rules rarely support "except", so the remainder has to be listed. Enter a base range and an exclusion to get CIDRs that exactly cover what is left.

What You Can Do

Subtract ranges
The base CIDR minus the excluded CIDR.
Minimal list
What remains in the fewest CIDRs.

How to Use CIDR Subtraction & Exclusion Tool

  1. 1
    Enter the base CIDRThe whole range.
  2. 2
    Enter the exclusionThe range to remove.
  3. 3
    CopyCopy the remaining CIDRs.

Examples

Remove the first /26 of a /24
Input: 10.0.0.0/24 − 10.0.0.0/26
Result: 10.0.0.64/26 10.0.0.128/25
Remove the upper half of a /24
Input: 192.168.0.0/24 − 192.168.0.128/25
Result: 192.168.0.0/25

Common Use Cases

  • Allowing an office range except a block of servers
  • Excluding some ranges from a VPN split tunnel

Frequently Asked Questions (FAQ)

What if the exclusion is outside the base range?

Nothing overlaps, so the base range is returned unchanged.

Have feedback or ideas for this tool? Suggest & Inquire →