CIDR and subnet calculator

Work out the network, broadcast, mask and usable range of an IPv4 CIDR block.

Runs in your browser. Your input is not uploaded.

Loading the tool…

What it does

CIDR notation writes an IPv4 network as an address and a prefix length: 192.168.1.0/24 means the first 24 bits are the network and the last 8 identify hosts, 256 addresses in all.

The calculator gives the network and broadcast addresses, the netmask and wildcard mask, the usable host range and whether the block is private, public or reserved. It also turns an arbitrary IP range into the smallest list of CIDR blocks.

How to use it

  1. Type a CIDR block, an address and netmask, or a single address.
  2. Read the network details.
  3. Use Range to CIDR for a start and end address.

Example

Input
192.168.1.77/24
Output
Network 192.168.1.0, broadcast 192.168.1.255, hosts 192.168.1.1–192.168.1.254 (254)

Things to watch for

  • A /31 has two usable addresses for point-to-point links (RFC 3021) and a /32 is a single host; neither reserves network and broadcast addresses.
  • Cloud providers reserve extra addresses in each subnet. AWS keeps five per subnet.
  • IPv6 is not supported yet.

Questions

How many hosts are in a /24?
256 addresses, 254 usable after the network and broadcast addresses.
What is a wildcard mask?
The inverse of the netmask, used in Cisco ACLs and OSPF. For /24 it is 0.0.0.255.
Which ranges are private?
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). 100.64.0.0/10 is carrier-grade NAT.
How do I convert an IP range to CIDR?
Enter the first and last address in Range to CIDR. The tool returns the fewest blocks that cover exactly that range.