CIDR / Subnet Calculator

Network, broadcast, host range and mask for IPv4/IPv6 CIDR.

The CIDR Calculator takes an IPv4 or IPv6 address in CIDR notation and shows the network address, subnet mask, host range and address counts. It can also split a network into smaller subnets of a prefix length you choose. It is useful for planning networks, writing firewall rules and checking cloud VPC ranges.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) writes an address range as an address followed by a slash and a prefix length, such as 192.168.1.0/24. The prefix length is the number of leading bits that identify the network; the remaining bits identify hosts. An IPv4 address has 32 bits, so a /24 leaves 8 host bits and covers 2^8 = 256 addresses. The subnet mask is the same idea written as an address (255.255.255.0 for /24) and the wildcard mask is its inverse (0.0.0.255), often used in access lists. In IPv4 the first address of a normal subnet is the network address and the last is the broadcast address, so a /24 has 254 usable hosts. Point-to-point links often use /31 as described in RFC 3021, and a /32 is a single host. IPv6 uses the same notation with 128-bit addresses and has no broadcast address.

How to use CIDR / Subnet Calculator

  1. Enter a CIDR block Type an address and prefix such as 10.0.0.0/16 or 2001:db8::/48 in the CIDR (IPv4 or IPv6) field. The field starts with 192.168.1.0/24.
  2. Read the summary The cards show Network, Mask, Wildcard, Broadcast (or Last address), First host, Last host, Total addresses and Usable hosts.
  3. Split into subnets In the Split into /N subnets field enter a prefix length from the current prefix up to 32 (IPv4) or 128 (IPv6). The field starts at 26.
  4. Copy the subnets The Subnets box lists each subnet on its own line. Copy it or download it as subnets.txt.

Frequently asked questions

Why are usable hosts two fewer than the total?

In a normal IPv4 subnet the first address identifies the network and the last is the broadcast address, so neither can be assigned to a host. A /24 has 256 addresses and 254 usable hosts.

How are /31 and /32 handled?

A /31 has two addresses and both are reported as usable, following RFC 3021 for point-to-point links. A /32 is a single address with 1 usable host.

What is the wildcard mask?

It is the bitwise inverse of the subnet mask. A zero bit means the bit must match and a one bit means any value is allowed. Some router access lists use wildcard masks instead of subnet masks.

Does IPv6 have a broadcast address?

No. IPv6 replaced broadcast with multicast, so the calculator shows Last address rather than Broadcast, and every address in the range is counted as usable.

Why is the subnet list limited?

Splitting a large block can create millions of subnets, so the list shows only the first 256. The line above it still reports the full number of subnets.

Is my input sent anywhere?

No. The calculation is pure arithmetic done in the page.