IP Range CalculatorConvert between IP address ranges and CIDR notation, showing total addresses and range details.

IP Range Calculator
Convert between IP address ranges and CIDR notation, showing total addresses and range details.
Choose Mode
Convert an IP range to CIDR notation, or CIDR to a range.
Enter IPs or CIDR
Input start/end IPs or a CIDR notation.
View Results
See the IP range, total addresses, and covering CIDR notations.
What Is IP Range Calculator?
The IP Range Calculator converts between IP address ranges (start IP to end IP) and CIDR notation. In range-to-CIDR mode, enter a start and end IP to find the covering CIDR notation(s). In CIDR-to-range mode, enter a CIDR block to see the start and end IP addresses. The calculator shows the total number of IP addresses in the range and, when converting from a range, may produce multiple CIDR blocks if the range does not align to a single CIDR boundary. This is essential for network planning, firewall rules, and IP allocation.
Why Use Our IP Range Calculator?
- Bidirectional: range→CIDR or CIDR→range conversion
- Shows total IP address count
- Handles non-aligned ranges with multiple CIDRs
- Essential for network configuration and firewall rules
Common Use Cases
Firewall Configuration
Convert IP ranges to CIDR blocks for firewall and ACL rules.
IP Allocation
Plan IP address allocation by understanding range sizes.
Security
Convert threat IP ranges to CIDR blocks for blocking rules.
Cloud Networking
Plan VPC subnets and IP ranges for cloud infrastructure.
Technical Guide
CIDR to range: given IP/prefix, the network address is IP AND mask, broadcast is network OR (NOT mask). Total IPs = 2^(32-prefix). Range to CIDR uses a greedy algorithm: starting from the start IP, find the largest CIDR block that fits within the range (aligns to the start and does not exceed the end), add it to the result, advance the start IP past the block, and repeat. Each iteration finds the maximum bit alignment of the current IP (trailing zeros in binary) that doesn't overshoot. The algorithm produces the minimum number of CIDR blocks to exactly cover any arbitrary range.
Tips & Best Practices
- 1An arbitrary IP range may require multiple CIDR blocks to represent exactly
- 2CIDR blocks must start at addresses aligned to their size (e.g., /24 starts at x.x.x.0)
- 3Larger CIDR prefix numbers = smaller networks (/32 is one IP, /0 is all IPs)
- 4Use this tool to consolidate multiple IPs into minimal CIDR blocks for firewall rules
Related Tools

Subnet Calculator
Calculate subnet details from IP address and CIDR prefix — network, broadcast, host range, and mask.

Bandwidth Calculator
Convert between bandwidth and data rate units — bps, Kbps, Mbps, Gbps, MB/s, and more.

Download Time Calculator
Calculate how long a file download will take based on file size and connection speed.

Number Base Converter
Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.

Percentage Calculator
Calculate percentages, percentage change, and what percent one number is of another.

Fraction Calculator
Add, subtract, multiply, and divide fractions with automatic simplification.
Frequently Asked Questions
QCan any IP range be expressed as a single CIDR?
QWhat does /32 mean?
QHow many IPs are in a /24?
QWhy do I get multiple CIDRs for my range?
QIs this for IPv4 only?
About IP Range Calculator
IP Range Calculator is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.







