99v

Subnet (CIDR) calculator

Work out the network, broadcast, host range and masks for any IPv4 or IPv6 block, and split it into smaller subnets.

You can also type a netmask: 10.0.0.0/255.255.252.0. The split box cuts the network into smaller ones, for example 26 for /26 subnets.

192.168.1.0/24 has 254 usable addresses, from 192.168.1.1 to 192.168.1.254. Private (RFC 1918).

Network address192.168.1.0
Prefix length/24
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Broadcast address192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Total addresses256
Usable hosts254
Address typePrivate (RFC 1918)
Legacy classC
Mask in hex0xffffff00
Reverse DNS zone1.168.192.in-addr.arpa

Binary

address  11000000.10101000.00000001.00000000
mask     11111111.11111111.11111111.00000000
network  11000000.10101000.00000001.00000000
         ^^^^^^^^ ^^^^^^^^ ^^^^^^^^

The first 24 bits are the network part and the rest identify hosts.

Split into /26 subnets

4 subnets with 62 usable hosts each.

SubnetFirst hostLast hostBroadcast
192.168.1.0/26192.168.1.1192.168.1.62192.168.1.63
192.168.1.64/26192.168.1.65192.168.1.126192.168.1.127
192.168.1.128/26192.168.1.129192.168.1.190192.168.1.191
192.168.1.192/26192.168.1.193192.168.1.254192.168.1.255

Try 10.0.0.0/8, 172.16.0.0/12 or 2001:db8::/32.

How it works

A subnet is a block of IP addresses that share the same first bits. The prefix length says how many: /24 means the first 24 bits name the network and the rest name hosts. Enter an address and prefix (CIDR notation), and this page works out the rest. It handles IPv4 and IPv6 and updates as you type, in your browser.

Worked example. 192.168.1.0/24 has 256 addresses. The first (192.168.1.0) names the network and the last (192.168.1.255) is the broadcast address, which leaves 254 usable hosts, from 192.168.1.1 to 192.168.1.254. The mask is 255.255.255.0 and the wildcard mask, used in router access lists, is 0.0.0.255. Split into /26 networks, you get four with 62 hosts each.

  • A /31 has two addresses and no broadcast (RFC 3021), and a /32 is a single address.
  • IPv6 has no broadcast address, and every address in the block is usable. Most IPv6 networks are /64s.
  • To see who owns a public address block, use the IP and network lookup.