CIDR / Subnet Calculator

Calculator

Enter an IP address in CIDR notation (e.g. 192.168.1.0/24) to instantly calculate the network address, broadcast address, usable host range, subnet mask, wildcard mask, and more.

Examples:

About this tool

About CIDR / Subnet Calculator

CIDR (Classless Inter-Domain Routing) is the notation used to define IP address ranges in modern networking. A CIDR block like 192.168.1.0/24 describes both the network address and its size — the /24 tells you that the first 24 bits are the network portion, leaving 8 bits for host addresses (256 total, 254 usable). This calculator takes any valid IPv4 CIDR block and instantly computes every useful derived value using pure bitwise arithmetic in your browser.

Enter any IPv4 CIDR block to get: network address, broadcast address, first and last usable host, total addresses, usable host count, subnet mask in dotted-decimal, wildcard mask (used in Cisco ACLs), CIDR notation normalized to the network address, binary representation of both the network and mask, IPv4 class, and whether the block falls in a private, public, link-local, or loopback range. The subnet split tool lets you divide any network into equal-sized smaller subnets by entering a new prefix length.

Use this calculator when designing IP address plans for office networks, cloud VPCs, or data centres; when writing firewall rules and need the wildcard mask for a Cisco ACL; when configuring BGP route aggregation and need to verify the exact network block; when setting up VLANs and need to know usable host counts; or when studying for CCNA/networking certifications and need to practice subnetting.

Unlike online subnet calculators that send your data to a server, this tool runs entirely in your browser — no data leaves your machine. Results update instantly as you type. The subnet split feature supports up to 256 sub-subnets and shows a complete table of network, broadcast, first host, last host, and usable host count for each subnet.

Key Features

  • Network address, broadcast, first/last usable host
  • Total and usable host count
  • Subnet mask (dotted decimal) and wildcard mask
  • Binary representation of network and mask
  • IPv4 class (A/B/C/D/E) and range type (private/public/loopback)
  • Subnet split: divide into up to 256 smaller subnets
  • Quick-load examples for common network blocks
  • 100% browser-based, works offline

FAQ

CIDR / Subnet Calculator — Frequently Asked Questions

What does the number after the slash mean in CIDR notation?

The number after the slash (e.g. /24) is the prefix length — it tells you how many of the 32 bits in the IPv4 address belong to the network portion. The remaining bits identify individual hosts. A /24 has 24 network bits and 8 host bits, giving 2^8 = 256 total addresses (254 usable, since the network address and broadcast address are reserved). A larger prefix like /30 means a smaller subnet (4 addresses, 2 usable), while a smaller prefix like /16 means a larger one (65,536 addresses).

What is the difference between the subnet mask and the wildcard mask?

The subnet mask uses 1s for network bits and 0s for host bits (e.g. 255.255.255.0 for /24). The wildcard mask is the bitwise inverse — it uses 0s for network bits and 1s for host bits (e.g. 0.0.0.255 for /24). Subnet masks are used when configuring IP addresses on interfaces. Wildcard masks are used in Cisco IOS access-control lists (ACLs) and OSPF network statements, where a 0 bit means 'must match' and a 1 bit means 'any value is acceptable'.

What are the private IP ranges?

RFC 1918 defines three private IPv4 ranges that are not routable on the public internet: 10.0.0.0/8 (16,777,216 addresses, Class A), 172.16.0.0/12 (1,048,576 addresses, Class B range 172.16–172.31), and 192.168.0.0/16 (65,536 addresses, Class C). Additionally, 127.0.0.0/8 is reserved for loopback (your machine addressing itself), 169.254.0.0/16 is link-local (used when DHCP fails), and 100.64.0.0/10 is the shared address space used by carrier-grade NAT.

How many usable hosts does a /24 subnet have?

A /24 subnet has 256 total addresses (2^8) but only 254 are usable for hosts. The first address (e.g. 192.168.1.0) is the network address and cannot be assigned to a host. The last address (e.g. 192.168.1.255) is the broadcast address, used to send packets to all hosts on the subnet simultaneously. This 'total minus 2' rule applies to all subnets with prefix lengths /1 through /30. For /31 (used for point-to-point links per RFC 3021) and /32 (a single host route), both addresses are usable.

What is subnet splitting and how does it work?

Subnet splitting (also called subnetting) divides a larger IP block into smaller equal-sized blocks. Each split doubles the number of subnets and halves their size. For example, splitting a /24 into /25 gives 2 subnets of 128 addresses each; splitting into /26 gives 4 subnets of 64 addresses. This is done by borrowing host bits and using them as additional network bits. The subnet split tool on this page shows the network, broadcast, first host, last host, and usable host count for every resulting subnet.

What is the difference between IPv4 classes A, B, C, D, and E?

Classful addressing was the original way to divide the IPv4 space before CIDR replaced it. Class A (first octet 1–127) had a default mask of /8, supporting huge networks. Class B (128–191) had /16. Class C (192–223) had /24. Class D (224–239) is multicast and not used for regular host addressing. Class E (240–255) is experimental and reserved. Today, CIDR allows any prefix length, making the class system largely obsolete for subnetting — but understanding it helps when reading older documentation or configuring some routing protocols.

Tips

  • The network address and broadcast address cannot be assigned to hosts — usable hosts = total − 2 (for /1 through /30)
  • Use a /30 (4 addresses, 2 usable) for point-to-point WAN links between routers
  • Cloud VPCs (AWS, GCP, Azure) often reserve 4–5 addresses per subnet, not just 2 — check your cloud provider's docs
  • The wildcard mask is the inverse of the subnet mask — use it directly in Cisco ACLs and OSPF network statements