Domain & Server Tools

Subnet Calculator


Calculate IPv4 network and broadcast addresses, usable host range, subnet mask, wildcard, and binary from any IP and CIDR prefix — free and in your browser.

CIDR Subnet mask Wildcard Total hosts Usable

A Subnet Calculator is a free tool that takes an IPv4 address plus a CIDR prefix (like /24) or a dotted subnet mask (like 255.255.255.0) and instantly works out the network address, broadcast address, first and last usable host, total and usable host counts, wildcard mask, IP class, and the binary layout of the block. Everything runs locally in your browser with pure bitwise math, so no IP addresses ever leave your device.

What is a subnet?

A subnet is a logical division of an IP network. The subnet mask (or its shorthand, the CIDR prefix) marks where the network portion of an address ends and the host portion begins. Bits set to 1 in the mask belong to the network; bits set to 0 identify individual hosts. From those two numbers you can derive every other property of the block, which is exactly what this calculator does.

How to use the subnet calculator

  1. Type an IPv4 address into the address field, for example 192.168.1.10.
  2. Enter a CIDR prefix such as /24, a plain number like 24, or a dotted netmask like 255.255.255.0. You can also drag the prefix slider.
  3. Read the results instantly — network, broadcast, host range, subnet mask, wildcard, IP class, and host counts update live as you type.
  4. Check the binary panel to see exactly which bits are the network and which are the host.
  5. Click Copy All to grab the full breakdown as plain text.

What the results mean

  • Network address: the first address in the block, identifying the subnet itself.
  • Broadcast address: the last address, used to reach every host on the subnet at once.
  • First & last usable host: the assignable range that sits between the network and broadcast addresses.
  • Total hosts: 2 raised to the number of host bits (2^(32 − prefix)).
  • Usable hosts: total minus the network and broadcast addresses (except on /31 and /32).
  • Wildcard mask: the inverse of the subnet mask, commonly used in access control lists.
  • Subnet mask & CIDR: the mask in both dotted and prefix notation.
  • IP class: the legacy classful category (A, B, C, D, or E) based on the first octet.

Why use a browser-based subnet calculator?

Manual subnetting is error-prone: a single miscounted bit shifts the whole boundary. This tool removes the guesswork with instant, accurate results and a live binary view so you can actually see the network/host split. Because it is client-side, it is a natural companion to other network utilities — pair it with an IP Lookup to see the geolocation and ISP behind an address, or a DNS Lookup to resolve the hostnames living inside the range you just planned.

When to use each prefix

Smaller networks use longer prefixes: a /30 gives two usable hosts, ideal for point-to-point links, while a /24 offers 254 hosts for a typical office LAN. If you need to understand how those prefix numbers relate to raw binary boundaries, a Number Base Converter helps translate between decimal, hexadecimal, and binary. Special cases matter too: RFC 3021 allows /31 for two-host point-to-point links, and /32 describes a single host — this calculator handles both.

Subnet Calculator features

  • Accepts CIDR prefix, plain prefix number, or dotted subnet mask.
  • Live calculation with input validation and clear error messages.
  • Full binary breakdown with the network bits highlighted.
  • Reference table of common prefixes you can click to apply.
  • One-click copy and 100% client-side privacy.

Subnetting is one step in a larger toolkit for planning and securing infrastructure. Once your ranges are mapped, a WHOIS Lookup reveals ownership and registration details for public blocks, and an SSL Certificate Checker verifies that the services running on those hosts present valid certificates.

Frequently Asked Questions

How do I calculate the number of hosts in a subnet?

Take 2 to the power of the number of host bits, which is 32 minus the prefix length. For a /24 that is 2^8 = 256 total addresses. Subtract 2 (the network and broadcast addresses) to get 254 usable hosts.

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

A subnet mask marks network bits with 1s and host bits with 0s. A wildcard mask is its exact inverse — 0s for the fixed network bits and 1s for the variable host bits — and it is used mainly in router access control lists and OSPF configuration.

What are the usable hosts in a /31 or /32 network?

A /32 represents a single host with no separate network or broadcast address. A /31 has just two addresses; under RFC 3021 both are usable for point-to-point links, so there is no wasted broadcast address.

Does this subnet calculator send my IP anywhere?

No. All calculations run entirely in your browser using JavaScript bitwise operations. No IP addresses, masks, or results are transmitted to any server or stored anywhere.

Can I enter a subnet mask instead of a CIDR prefix?

Yes. You can type a dotted mask like 255.255.255.0, a CIDR prefix like /24, or just the number 24. The tool validates that a dotted mask is contiguous before using it and rejects invalid masks.

What is an IP class and does it still matter?

IP classes (A, B, C, D, E) are the legacy classful system based on the first octet. Modern networks use classless CIDR instead, but the class is still shown here as a quick reference and because some documentation and tools continue to mention it.