How to use the ip range calculator
- Select CIDR to IP Range to expand a prefix, or IP Range to CIDR to summarize addresses.
- For CIDR mode, type a block like
192.168.1.0/24. The tool immediately shows the network address, broadcast address, usable range, subnet mask, and total host count. - For range mode, enter a start and end IPv4 address such as
10.0.0.1and10.0.0.14. - Read the resulting minimal CIDR blocks. Each block is aligned to its natural boundary, matching what standard networking libraries produce.
How the IP Range Calculator Subnet Mask Logic Works
A CIDR block combines an IPv4 address with a prefix length. The prefix length tells you how many high-order bits form the network portion. To find the subnet mask, set those bits to 1 and the rest to 0. For example, a /24 prefix means 24 ones followed by 8 zeros, which gives 255.255.255.0.
The network address is found by performing a bitwise AND between the IP and the mask. The broadcast address sets all host bits to 1. Usable addresses fall strictly between these two boundaries. A /24 network therefore has 256 total addresses, 254 of which are usable for hosts. When you use this ip range calculator subnet mask feature, it performs these exact bitwise operations on your input.
Summarizing an IP Range to Minimal CIDR Blocks
When you use this ip range calculator to convert a start and end address into CIDR notation, the algorithm finds the largest power-of-two block that fits at the current start address without exceeding the end address. It emits that block, advances the start pointer, and repeats until the entire range is covered.
This process guarantees the fewest possible CIDR entries. For instance, the range 192.168.1.10 to 192.168.1.13 cannot be expressed as a single /29 because a /29 must start on a multiple of 8. Instead, it splits into 192.168.1.10/31 and 192.168.1.12/30. This matches the output of Python's ipaddress.summarize_address_range function exactly.
Common Prefix Lengths Reference
The table below lists frequently used IPv4 prefix lengths, their subnet masks, total addresses, and usable host counts. Use it as a quick lookup alongside the cidr to ip range converter above.
| Prefix | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
Practical Uses for IP Calculator Range Tools
Network engineers use an ip calculator range workflow when configuring access control lists, firewall rules, or routing policies. Summarizing a list of individual server addresses into a few CIDR blocks reduces configuration size and improves router lookup performance.
Developers provisioning cloud infrastructure often need to divide a large VPC CIDR block into smaller subnets. By converting ranges back and forth, they can verify that no overlaps exist. If you work with IPv6 networks instead, the IPv6 subnet calculator handles 128-bit addresses. For lower-level representations, you can also convert addresses using the ip to binary or hex to ip tools.
Edge Cases and Common Mistakes
A frequent mistake is assuming any arbitrary start and end address can form a single CIDR block. CIDR blocks must align to powers of two. A /24 block always starts where the last octet is 0. If your range crosses that boundary, it requires multiple prefixes.
Another issue involves /31 and /32 networks. Historically, a /31 was considered unusable because it left zero host addresses after subtracting network and broadcast. However, RFC 3021 allows /31 blocks for point-to-point links, giving two usable addresses. A /32 represents a single host route, common in loopback interfaces or specific firewall rules.
Always ensure your input uses valid dotted-decimal notation. Octets must be between 0 and 255, and the prefix length must be between 0 and 32. Invalid inputs will return an error rather than incorrect math.
Worked examples
| Example | Input | Result |
|---|---|---|
| Standard /24 network | Mode: cidr; CIDR notation (e.g. 192.168.1.0/24): 192.168.1.0/24 | Network Address: 192.168.1.0; Broadcast Address: 192.168.1.255; Subnet Mask: 255.255.255.0; Total Addresses: 256; Usable Hosts: 254; First Usable: 192.168.1.1; Last Usable: 192.168.1.254 |
| Large /8 block | Mode: cidr; CIDR notation (e.g. 192.168.1.0/24): 10.0.0.0/8 | Network Address: 10.0.0.0; Broadcast Address: 10.255.255.255; Subnet Mask: 255.0.0.0; Total Addresses: 16,777,216; Usable Hosts: 16,777,214; First Usable: 10.0.0.1; Last Usable: 10.255.255.254 |
| Summarize a small range | Mode: range; Start IP: 192.168.1.10; End IP: 192.168.1.50 | Start IP: 192.168.1.10; End IP: 192.168.1.50; Total Addresses: 41; CIDR Blocks: 6 |
| Single host route | Mode: cidr; CIDR notation (e.g. 192.168.1.0/24): 172.16.0.1/32 | Network Address: 172.16.0.1; Broadcast Address: 172.16.0.1; Subnet Mask: 255.255.255.255; Total Addresses: 1; Usable Hosts: 1; First Usable: 172.16.0.1; Last Usable: 172.16.0.1 |
FAQ
What does this ip range calculator subnet mask tool do?
It converts a CIDR block into its network address, broadcast address, usable range, and subnet mask. It also summarizes a start and end IPv4 address into the minimal set of CIDR blocks covering that range.
How do I use an IP range to CIDR calculator?
Switch the mode to 'IP Range to CIDR', enter your start and end addresses, and the tool outputs the smallest number of aligned CIDR blocks that cover every address in the range.
Why does my range split into multiple CIDR blocks?
CIDR blocks must align to powers of two. If your start address is not a multiple of the block size, or if the range spans a natural boundary, it requires more than one prefix to cover accurately.
Is a /31 subnet usable?
Yes. While older standards reserved /31 as invalid for hosts, RFC 3021 permits /31 subnets for point-to-point links, providing exactly two usable addresses.
Does this tool support IPv6?
This page handles IPv4 only. For 128-bit addresses, use the dedicated IPv6 subnet calculator.
Are my IP addresses sent to a server?
No. All calculations happen locally in your browser. Nothing is uploaded or logged.