IPv4 CIDR Subnet & VLSM Calculator

Find an IPv4 network, broadcast and usable host range. Allocate variable-size subnets and check whether multiple CIDRs can be summarized exactly.

Inputs

One name,hosts or name,/prefix per line. Leave blank for CIDR details only.
Optional. Separate blocks with commas or spaces.

Calculated in your browser

Results

Network CIDR
192.168.20.0/24
Usable in parent
254
Unassigned after VLSM
144

IPv4 address-space map

IPv4 address-space mapBlock widths follow the share of the parent address space. The lower axis shows positions from the first to the last address.192.168.20.0/24112 used · 144 unassignedParent spaceOffice 192.168.20.0/26OfficeLab 192.168.20.64/27LabDevices 192.168.20.96/280%25%50%75%100%192.168.20.0192.168.20.255
  • Office · 192.168.20.0/26
  • Lab · 192.168.20.64/27
  • Devices · 192.168.20.96/28
  • Unassigned
Block widths follow the share of the parent address space. The lower axis shows positions from the first to the last address.
Network
192.168.20.0
Broadcast
192.168.20.255
First usable
192.168.20.1
Last usable
192.168.20.254
Subnet mask
255.255.255.0
Wildcard
0.0.0.255
Input bits
11000000 10101000 00010100 00000000
Mask bits
11111111 11111111 11111111 00000000
Network bits
11000000 10101000 00010100 00000000
Allocated subnets
NameCIDRRequestedUsableUsable range
Office192.168.20.0/265062192.168.20.1 – 192.168.20.62
Lab192.168.20.64/272530192.168.20.65 – 192.168.20.94
Devices192.168.20.96/281014192.168.20.97 – 192.168.20.110

How the calculator works

Find the boundaries

An IPv4 /p prefix has 2^(32 − p) addresses. Round the input address down to a multiple of that block size for the network. Add block size minus one for the last address.

Fit the requested hosts

For LAN requests, add two addresses for the network and broadcast, then round up to a power of two. Place the largest aligned blocks first. Use an explicit /31 or /32 for a point-to-point link or host route.

Check the route summary

The smallest covering supernet uses the common leading bits of the first and last addresses. A summary is exact when the union fills every address in that block.

Questions

How many usable hosts are in a conventional IPv4 /24?

A /24 has 256 total addresses and 254 conventional host addresses after reserving the network and broadcast.

What is the difference between a covering and an exact supernet?

A covering supernet can include addresses outside the original CIDRs. An exact supernet covers precisely the union of the inputs.

References