CIDR Calculator

CIDR notation (e.g., 192.168.1.0/24) specifies an IP address and network prefix length. The prefix tells how many bits identify the network. /24 = 256 addresses (254 usable hosts), netmask 255.255.255.0. /16 = 65,536 addresses, netmask 255.255.0.0. /8 = 16.7M addresses. Usable hosts = 2^(32-prefix) - 2 (minus network and broadcast).

Calculate IP subnet details from CIDR notation. Get network address, broadcast address, netmask, wildcard mask, first and last usable hosts, total addresses, and IP class. Supports all prefix lengths from /0 to /32.

Works OfflineDark ModeNo Ads

Presets

CIDR Input

Common CIDR Ranges

PrefixNetmaskHostsTypical Usage
/32255.255.255.2551Single host
/31255.255.255.2542Point-to-point link
/30255.255.255.2522 usablePoint-to-point (with network/broadcast)
/28255.255.255.24014 usableSmall office/department
/24255.255.255.0254 usableStandard LAN subnet (Class C)
/20255.255.240.04,094Large office building
/16255.255.0.065,534Campus network (Class B)
/8255.0.0.016.7MLarge enterprise (Class A)
/00.0.0.04.3BDefault route (all IPs)

How to Use

  1. 1

    Enter CIDR notation

    Type an IP address with prefix length (e.g., 192.168.1.0/24). Or click a preset for common subnet sizes like /24, /16, /8, /28.

  2. 2

    View subnet details

    See network address, broadcast address, netmask, wildcard mask, first/last usable host, total addresses, and usable host count.

  3. 3

    Check IP classification

    The calculator identifies the IP class (A, B, C, D, E) and whether the address is private (RFC 1918) or public.

  4. 4

    Copy the summary

    Click Copy to copy all subnet details as formatted text. Use the CIDR reference table for quick prefix-to-netmask lookups.

Frequently Asked Questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network prefix. Written as IP/prefix (e.g., 192.168.1.0/24), the prefix indicates how many bits of the address identify the network. A /24 means the first 24 bits are the network portion, leaving 8 bits (256 addresses) for hosts.
How do I calculate the number of hosts in a CIDR block?
Total addresses = 2^(32 - prefix). Usable hosts = total - 2 (subtract network and broadcast addresses). For /24: 2^8 = 256 total, 254 usable. For /28: 2^4 = 16 total, 14 usable. For /32: 1 address (single host). For /31: 2 addresses (point-to-point link, no broadcast).
What is the difference between netmask and wildcard mask?
A netmask uses 1s for the network portion and 0s for the host portion (e.g., 255.255.255.0 for /24). A wildcard mask is the inverse: 0s for network, 1s for hosts (e.g., 0.0.0.255 for /24). Wildcard masks are used in Cisco ACLs and OSPF configurations. Netmask + wildcard = 255.255.255.255.
What are RFC 1918 private IP ranges?
RFC 1918 defines three private IP ranges not routable on the public internet: 10.0.0.0/8 (16.7M addresses), 172.16.0.0/12 (1M addresses), and 192.168.0.0/16 (65K addresses). These are used for internal networks. Your home router typically uses 192.168.0.0/24 or 192.168.1.0/24.
What is subnetting and why is it used?
Subnetting divides a large network into smaller subnetworks (subnets). Benefits include reduced broadcast traffic, improved security (isolate departments), efficient IP allocation, and easier troubleshooting. A company with a /16 might subnet into multiple /24 networks for different floors or departments.
What is the difference between network address and broadcast address?
The network address is the first address in a subnet (all host bits = 0) and identifies the network itself. The broadcast address is the last address (all host bits = 1) and sends packets to all hosts on the subnet. Neither can be assigned to a host. In 192.168.1.0/24: network = 192.168.1.0, broadcast = 192.168.1.255.

Related Tools