IP Range Calculator Convert 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 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
Number Base Converter
Convert numbers between any bases from 2 to 36, including binary, octal, decimal, and hex.
🔢 Math & Calculators
Bandwidth Calculator
Convert between bandwidth and data rate units — bps, Kbps, Mbps, Gbps, MB/s, and more.
🔢 Math & Calculators
Download Time Calculator
Calculate how long a file download will take based on file size and connection speed.
🔢 Math & Calculators
Subnet Calculator
Calculate subnet details from IP address and CIDR prefix — network, broadcast, host range, and mask.
🔢 Math & CalculatorsFrequently Asked Questions
Q Can any IP range be expressed as a single CIDR?
Q What does /32 mean?
Q How many IPs are in a /24?
Q Why do I get multiple CIDRs for my range?
Q Is this for IPv4 only?
About This Tool
IP Range Calculator is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.