trace·warrior
  • Tools
  • Monitoring
  • Pricing
  • Resources
  • About
Sign inGet started
trace·warrior

Network diagnostics for IT professionals. Built for speed, accuracy, and the long tail of the Friday afternoon outage.

ALL SYSTEMS NOMINAL
Tools
  • DNS Lookup
  • Ping Test
  • Port Checker
  • WHOIS
  • See all
Product
  • Monitors
  • Pricing
  • How-to guides
  • Compare
Resources
  • Blog
  • API docs
  • Tool index
  • Contact
Company
  • About
  • Privacy
  • Terms
  • Cookie policy
© 2026 Trace Warrior · made for engineers, by engineersnetwork forensics, quietly
/
/
tools/utilities/subnet-calculator
Utilities

Subnet Calculator

Free subnet calculator. Compute network address, broadcast address, usable host range, subnet mask, and host count from any IPv4 CIDR. Also a CIDR calculator, netmask calculator, IP range calculator, and subnet mask calculator: same tool, different names. Handles /0 through /32 including RFC 3021 /31 point-to-point and /32 single-host edge cases.

How CIDR and subnet masks divide a network

An IPv4 address is 32 bits. CIDR notation such as 10.0.0.0/24 splits those bits into a network part and a host part: the /24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within it. The same boundary can be written as a dotted subnet mask, so /24 equals 255.255.255.0. From the prefix length this tool derives the network address, the broadcast address, the usable host range, the mask, and the total host count for any prefix from /0 to /32.

The usable host count is normally two fewer than the block size, because the first address is reserved as the network identifier and the last is the broadcast address. A /24 holds 256 addresses but only 254 usable hosts. Getting this off-by-two wrong is one of the most common addressing mistakes when planning a LAN or carving a VPC into subnets.

The /31 and /32 edge cases most calculators get wrong

A naive host formula breaks at the smallest prefixes. A /32 is a single host, typically a loopback or a specific route, with no network or broadcast address to subtract. A /31 has only two addresses and would normally have zero usable hosts, but RFC 3021 defines it as a valid point-to-point link where both addresses are assignable to the two ends. This tool applies those rules so a /31 reports two usable hosts and a /32 reports one, rather than a nonsensical negative count.

Understanding where the boundary falls also tells you whether two addresses can talk directly. If both share the same network and broadcast address for a given mask they are on the same subnet; if not, traffic between them has to cross a router. Widening the mask (a smaller prefix number) merges subnets, narrowing it (a larger number) splits one into more, smaller blocks.

Frequently asked questions

What does the /24 in an IP address mean?

It is the CIDR prefix length: the number of leading bits that identify the network. A /24 means the first 24 bits are the network and the last 8 bits are for hosts, which is the same as the subnet mask 255.255.255.0.

How many usable hosts are in a /24?

A /24 contains 256 addresses but 254 usable hosts, because the first address is the network identifier and the last is the broadcast address, and neither can be assigned to a device.

Why does a /31 have two usable hosts instead of zero?

RFC 3021 allows /31 prefixes on point-to-point links, where the network and broadcast addresses are not needed, so both of the two addresses are assignable to the two endpoints of the link.

What is the difference between a subnet mask and CIDR notation?

They express the same boundary two ways. CIDR uses a slash and a bit count (/24), while a subnet mask writes it as four dotted octets (255.255.255.0). Every prefix length has one equivalent mask.

Related tools

  • IP Geolocation →
  • What's My IP →
  • MAC Address Lookup →
  • Domain to IP →
Enter a CIDR
Try 10.0.0.0/24 or 2001:db8::/32