CIDR Subnet Calculator

Enter a CIDR block and get the netmask, network and broadcast addresses, host range and usable host count.

CIDR block
Details
Runs locally in your browser

About the CIDR Subnet Calculator

CIDR notation like 192.168.1.0/24 describes a range of IP addresses, and working out its boundaries by hand means thinking in binary. This calculator does it: from a CIDR block it derives the subnet mask, the wildcard mask, the network and broadcast addresses, the first and last usable host, the number of usable hosts, and the mask in binary. That covers what you need to plan a network, configure a firewall rule, or check whether an address falls in a range.

The /31 and /32 special cases are handled correctly (a /31 is a point-to-point link with two usable addresses, a /32 is a single host). Everything is computed locally. For converting individual addresses, the IP to Binary and IP to Decimal tools help.

How to use

  1. Enter a CIDR block such as 10.0.0.0/16.
  2. Read the mask, range and host count.
  3. Use the binary mask to see the network and host split.

Common questions

Why are usable hosts two fewer than total?
The network address and broadcast address are reserved, so a /24 has 256 addresses but 254 usable hosts. /31 and /32 are special cases.
What is the wildcard mask?
The inverse of the subnet mask, used in some access-control lists such as Cisco ACLs.
Does it support IPv6?
This calculator is for IPv4 CIDR. IPv6 subnetting works differently.