IP Range Calculator
Count the addresses between two IPv4 addresses and find a CIDR block that covers them.
Jump to toolWhat Is an IP Range Calculator?
An IP range calculator measures a span of IPv4 addresses given by a start and an end address, such as 192.168.1.10 to 192.168.1.50. It tells you how many addresses the span contains, which is useful when you size a DHCP pool or an allow-list.
Enter a start and end address and the tool counts the addresses, both ends included, and suggests a CIDR block that covers the range. The suggested block can be larger than the range itself, so check the extra addresses before using it in a firewall rule.
How to Calculate an IP Range
- Enter the Start IP and End IP of the range.
- Select Calculate.
- Read the number of addresses and the suggested CIDR block, and check whether that block extends past your range.
Worked Example: 192.168.1.10 to 192.168.1.50
| Question | Answer |
|---|---|
| How many addresses? | 41 (50 minus 10, plus 1 because both ends count) |
| Smallest single CIDR block that covers it | 192.168.1.0/26, which spans .0 to .63 |
| Extra addresses in that block | 23 (.0 to .9 and .51 to .63) |
Why a Covering Block Can Be Too Big
CIDR blocks must start on a boundary and have a power-of-two size, so most ranges do not fit one exactly. A single covering block will include extra addresses; to match a range exactly, you need several smaller blocks.
Common Uses
- Sizing a DHCP pool and checking it fits inside the subnet.
- Turning a list of allowed addresses into firewall rules.
- Checking how many addresses a provider has given you.
IP Range Calculator FAQ
Convert addresses to numbers
See the integer behind any IPv4 address.
Related Tools
Tools that often come next after this one