IPv4 range expander

Given a start and an end IPv4 address, this tool calculates a valid IPv4 subnet along with its CIDR notation.

About IPv4 range expander

Given the first and last address of a range, finds the smallest CIDR block that contains the whole range, and shows how many addresses the block covers compared with the range you asked for.

When you would use it

How to use it

  1. Enter the start and the end address.
  2. Read the result table: the original and the expanded start and end, the number of addresses and the CIDR.
  3. If the end is lower than the start, use the swap button to exchange them.

Things worth knowing

Frequently asked questions

Why does my range of 1000 addresses become a /22 with 1024?
Because 1000 is not a power of two and the range is not aligned. The smallest block that contains all 1000 addresses is 1024 addresses wide.
How do I get an exact list of blocks instead?
Split the range at power-of-two boundaries: repeatedly take the largest aligned block that starts at the current start address and fits in the range, then continue from the next address.

All the tools