CIDR Calculator
Test IP membership and summarise multiple CIDR blocks.
Use the CIDR Calculator tool
What this cidr calculator does
CIDR Calculator works in both directions. In membership mode it tells you whether an address belongs to a given prefix, which is useful for verifying ACLs and routing rules. In aggregation mode it takes a list of CIDR blocks and merges adjacent blocks into the shortest possible summary — the same idea used by route summarisation in BGP and OSPF.
All calculations are performed locally with 32-bit or 128-bit integer arithmetic. The output shows both the input blocks and the resulting summaries, so you can see exactly what was collapsed.
Why use it
- Confirm that a firewall rule actually covers the host you expect.
- Summarise dozens of cloud provider ranges into a compact ACL.
- Validate that two networks can be aggregated without accidentally including addresses you do not own.
How to use it
- 1Choose Membership mode to test an IP against one or more prefixes.
- 2Or choose Aggregate mode and paste one CIDR block per line.
- 3Press Calculate to see range details or merged summaries.
- 4Review warnings when a merge would include address space outside the input list.
Worked examples
Membership
Input
IP 10.20.30.40 · CIDR 10.20.0.0/16
Output
Inside · range 10.20.0.0 – 10.20.255.255
Aggregation
Input
192.168.0.0/25 192.168.0.128/25
Output
192.168.0.0/24
The two halves of the /24 combine exactly, so the summary covers no extra addresses.
Common mistakes
- Aggregating blocks that are not adjacent, which silently includes addresses outside your allocation.
- Assuming 0.0.0.0/0 is harmless — it matches every address, including traffic you did not intend to allow.
- Mixing IPv4 and IPv6 in one aggregation request; aggregate each family separately.
Frequently asked questions
What does CIDR mean?
Can this tool aggregate IPv6 prefixes?
Does aggregation change what I can reach?
Related tools
All toolsIPv4 Subnet Calculator
Network, broadcast, host range and binary working for IPv4.
IPv6 Subnet Calculator
IPv6 prefix maths with correct 128-bit address counts.
IP Address Validator
Validate and classify IPv4 and IPv6 addresses.
DNS Lookup
Query DNS records over DoH with multiple record types.