CIDR Subtraction & Exclusion Tool
Local ProcessingCarve 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
- 1Enter the base CIDRThe whole range.
- 2Enter the exclusionThe range to remove.
- 3CopyCopy 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.
