AIWalay Tools

CIDR Calculator

Convert an IPv4 address and CIDR prefix into subnet mask, wildcard, network, broadcast, usable host range and address counts.

About the CIDR Calculator

This CIDR calculator turns an IPv4 address and prefix length into every subnet detail you need: the subnet mask in dotted-decimal and binary, the wildcard mask, the network and broadcast addresses, the first and last usable hosts, and the total and usable address counts. Paste 10.0.0.0/8 straight into the address field or type the prefix separately.

CIDR (Classless Inter-Domain Routing) replaced the old Class A/B/C system with flexible prefixes from /0 to /32, letting you size a network to exactly the hosts it needs. The calculator also flags whether the address is public or private and shows its legacy class for reference.

It runs entirely in your browser with exact 32-bit integer arithmetic, so results are instant and correct even for edge cases like /31 point-to-point links and /32 single hosts.

How to Use the CIDR Calculator

  1. 1Enter an IPv4 address, or paste full CIDR notation like 192.168.1.0/24.
  2. 2Set the prefix length (0–32) if it isn't already in the address.
  3. 3Click Calculate to see the mask, network, broadcast, range and counts.
  4. 4Copy all details with one click.

Frequently Asked Questions

How do I convert a CIDR prefix to a subnet mask?

The prefix is the number of leading 1-bits in the mask. /24 means 24 ones followed by 8 zeros, which is 255.255.255.0. /26 is 255.255.255.192, /30 is 255.255.255.252. This tool shows the mask in both dotted-decimal and binary for any prefix from 0 to 32.

How many hosts are in a /24 network?

A /24 has 256 total addresses. Two are reserved — the network address and the broadcast address — leaving 254 usable host addresses. In general a /n has 2^(32−n) total addresses and 2^(32−n) − 2 usable, except /31 (2 hosts, RFC 3021) and /32 (a single host).

What are the network and broadcast addresses?

The network address is the first address in the block (all host bits 0) and identifies the subnet itself. The broadcast address is the last (all host bits 1) and reaches every host on the subnet. Usable host addresses are everything in between.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask — for 255.255.255.0 it's 0.0.0.255. Access control lists in Cisco IOS and some firewalls use wildcard masks instead of subnet masks to specify which bits to match.

Which IP ranges are private?

RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks, plus 127.0.0.0/8 for loopback and 169.254.0.0/16 for link-local. The calculator labels an address as private or public based on these ranges.

Related Tools