CIDR to Subnet Mask Converter

Turn a /prefix into its netmask, wildcard and host range.

Processed locally — nothing is uploaded

About Subnet Calculator

Usable hosts always come to two below the total: the first address names the network and the last is the broadcast address, and neither can be assigned. That arithmetic is why a /30 yields only two usable addresses.

Convert a CIDR prefix like /24 into its subnet mask and wildcard mask, with the full network, broadcast and usable host range. It is computed locally in your browser.

A subnet calculator turns an IPv4 address and its CIDR prefix (or netmask) into everything you need to plan or troubleshoot a network: the network and broadcast addresses, the first and last usable host, the total and usable host counts, the wildcard mask and the address class. Enter something like 192.168.1.10/24 — or a netmask such as 255.255.255.0 — and every value updates instantly.

It also splits a block into equal subnets, which is the core of VLSM (variable-length subnet masking) design. Slide to a longer prefix to see how a /24 divides into /26s or /30s, complete with each child network's usable range and broadcast address.

Learn how this works

Frequently asked questions

How does /24 relate to 255.255.255.0?

They are the same thing written two ways. The CIDR suffix counts the leading one-bits; 24 ones followed by 8 zeros, grouped into bytes, is 255.255.255.0. CIDR is simply the more compact notation.

Why does modern networking prefer CIDR?

Because the old class A/B/C system allocated addresses in fixed, wasteful blocks. CIDR allows any prefix length, so a network can be sized to what is actually needed — which is what extended the usable life of IPv4.

What is a wildcard mask?

The bitwise inverse of a subnet mask — 0.0.0.255 where the mask is 255.255.255.0. Cisco ACLs and some routing protocols expect it in that form, and mixing the two up is a common configuration error.

Common Use Cases

  • Translating a prefix into the mask a device's config expects
  • Producing a wildcard mask for an access control list
  • Confirming a mask is valid before applying it to an interface

More Subnet Calculator tools

Related tools