CIDR Calculator

Calculate IP range, netmask, and host count for IPv4 subnets.

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Netmask

255.255.255.0

Usable Hosts

254

Range

192.168.1.1 - 192.168.1.254

About CIDR and subnetting

CIDR (Classless Inter-Domain Routing) is the modern way of writing IP address ranges. Instead of the old A/B/C class system, a CIDR block is written as an address followed by a slash and the number of network bits — e.g. 10.0.0.0/16 means "the 65,536 addresses from 10.0.0.0 through 10.0.255.255". CIDR underlies every modern routing decision: BGP advertisements, AWS VPC subnets, Kubernetes pod CIDRs, firewall rules, and VPN tunnels.

This calculator takes a CIDR block and tells you the network address, broadcast address, first and last usable hosts, total host count, subnet mask, wildcard mask, and binary representation. It also supports IPv6 and lets you carve a block into smaller subnets.

How to use

  1. Paste a CIDR block such as 10.0.0.0/24 or 2001:db8::/48 into the input.
  2. Read the breakdown: network range, broadcast, first/last host, mask and binary form.
  3. Use the subnet builder to split the block into smaller equal-sized chunks.
  4. Copy any of the values for use in your firewall rule or routing table.

Common use cases

  • Designing AWS VPC subnets without overlapping with on-prem ranges.
  • Writing firewall rules with the right wildcard mask.
  • Allocating non-overlapping CIDRs across Kubernetes clusters.
  • Sanity-checking that a /16 contains a /24 you are about to advertise.

Frequently asked questions

How many usable hosts are in a /24?

256 addresses, of which 254 are usable for hosts. The first is the network address and the last is the broadcast address.

What is the smallest practical subnet?

A /30 has four addresses, two of which are usable — used for point-to-point links. A /31 has two addresses, both usable, per RFC 3021. A /32 is a single host route.

Why does /0 mean "everything"?

A prefix length of zero means no bits are fixed, so every address matches. 0.0.0.0/0 is the default route.

Advertisement