← All Tools

Subnet / CIDR Calculator

Calculate network details from an IP address and CIDR prefix. Get network address, broadcast, host range, subnet mask, wildcard mask, and more.

Enter an IP with CIDR notation (e.g. 10.0.0.0/8) or type an IP and pick a prefix from the dropdown.

Results
🔌
Enter an IP address above and click Calculate to see subnet details.

Common CIDR Notations

CIDR Subnet Mask Wildcard Total IPs Usable Hosts Notes

Understanding Subnetting and CIDR

What is CIDR Notation?

CIDR (Classless Inter-Domain Routing) notation is a compact way to express an IP address and its associated network mask. It is written as an IP address followed by a slash and a number, e.g. 192.168.1.0/24. The number after the slash is the prefix length -- the count of leading 1-bits in the subnet mask. A /24 prefix means the first 24 bits identify the network, leaving 8 bits for host addresses (256 IPs, 254 usable hosts).

Subnet Mask vs. Wildcard Mask

A subnet mask like 255.255.255.0 uses 1-bits to mark the network portion and 0-bits for the host portion. The wildcard mask is the bitwise inverse -- 0.0.0.255 for a /24. Wildcard masks are used in access control lists (ACLs) on Cisco routers and in OSPF configurations. Where the subnet mask says "must match," the wildcard mask says "don't care."

Network and Broadcast Addresses

The network address is the first IP in a subnet (all host bits set to 0). It identifies the subnet itself and cannot be assigned to a host. The broadcast address is the last IP (all host bits set to 1) and is used to send packets to every host on the subnet. The usable host range falls between these two addresses. For a /31, RFC 3021 allows both addresses to be used for point-to-point links.

IP Address Classes

Before CIDR, IPs were divided into classes:

  • Class A (1.0.0.0 -- 126.255.255.255): /8 default mask, large networks
  • Class B (128.0.0.0 -- 191.255.255.255): /16 default mask, medium networks
  • Class C (192.0.0.0 -- 223.255.255.255): /24 default mask, small networks
  • Class D (224.0.0.0 -- 239.255.255.255): Multicast
  • Class E (240.0.0.0 -- 255.255.255.255): Reserved/experimental

Private IP Ranges (RFC 1918)

Three IPv4 address blocks are reserved for private networks and are not routable on the public internet:

  • 10.0.0.0/8 -- 16,777,216 addresses (Class A private)
  • 172.16.0.0/12 -- 1,048,576 addresses (Class B private)
  • 192.168.0.0/16 -- 65,536 addresses (Class C private)

These ranges are used in home networks, corporate LANs, and behind NAT gateways. Additional special ranges include 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local / APIPA), and 100.64.0.0/10 (CGN / shared address space).

Why Subnetting Matters

Subnetting lets you divide a large network into smaller, more manageable segments. Benefits include:

  • Security -- isolate departments or services into separate subnets
  • Performance -- reduce broadcast domain size, lowering noise
  • Efficient IP usage -- allocate only as many addresses as needed (e.g. /30 for point-to-point links)
  • Routing -- CIDR enables route aggregation (supernetting), shrinking routing tables

Understanding subnetting is fundamental for network design, cloud VPC planning (AWS, GCP, Azure), Kubernetes pod networking, Docker bridge networks, and firewall rule configuration.

Copied!