CIDR and Subnet Calculator

Give it a block like 192.168.1.0/24 or 2001:db8::/48 and it works out the network, broadcast, host range and mask — for IPv4 and IPv6.


About

CIDR notation compresses an address range into an address and a prefix length, and this calculator expands it back into everything you need to configure a network: the network address, the broadcast address, the usable host range, the mask and the wildcard. It handles IPv4 and IPv6, including the special cases at the ends of the range.

How to use

  1. Enter a block such as 192.168.1.0/24 or 2001:db8::/48.
  2. Submit to get the network details for that prefix.
  3. Copy the mask, wildcard or host range into your router or firewall.

Frequently asked questions

Why does a /31 report two usable addresses?

A /31 is designed for point-to-point links. Both addresses are usable host addresses, and there is no broadcast address, so the older rule of subtracting two does not apply.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, so every address in a block can be assigned. The tool still shows the last address, which is simply the top of the range.

Why is the address count so large for IPv6?

Each missing bit of prefix doubles the block. A /64 holds about 18 quintillion addresses, which is why IPv6 subnets are normally sized by convention rather than by counting hosts.