Finance 55 tools → Seller Tools 17 tools → Date 19 tools → Health 28 tools → Everyday 25 tools → Math 22 tools → Construction 20 tools → PDF 25 tools → Education 11 tools → Conversion 7 tools → Text 14 tools → Image 22 tools → About → Contact →

Free Subnet Calculator

/

Runs entirely in your browser — your numbers are never sent anywhere.

Network address
—

Detail

Address breakdown in binary

What subnetting actually computes

An IPv4 address is 32 bits. A CIDR prefix like /24 says the first 24 bits name the network and the remaining 8 bits name hosts inside it. From that single split, everything else follows: the subnet mask (24 ones followed by 8 zeros, written 255.255.255.0), the network address (host bits all zero), the broadcast address (host bits all one), and the usable hosts in between. This calculator does that bit arithmetic for any address and prefix — or for a netmask you type directly, which overrides the CIDR field.

Hosts per subnet = 2(32 − prefix) · Usable hosts = total − 2

The two reserved addresses are the network address itself and the broadcast address, so a /24 (256 addresses) yields 254 usable hosts. The exceptions are /31 links (point-to-point, where RFC 3021 allows both addresses to be used) and /32 (a single host route) — this page reports the classic counts and flags those cases in the note.

Worked example

Take 192.168.1.10/24. The mask is 255.255.255.0, so the network address is 192.168.1.0 and the broadcast is 192.168.1.255. Usable hosts run from 192.168.1.1 to 192.168.1.254 — 254 hosts. The wildcard mask (the mask inverted, as used in some router ACLs) is 0.0.0.255.

How to use this calculator

  1. Type any IPv4 address — the network it belongs to is what matters, not the exact host.
  2. Set the CIDR prefix, or type a dotted netmask to override it.
  3. Read the network, broadcast and first/last usable host for your DHCP ranges, ACLs or firewall rules.
  4. Check the binary rows in the Detail section when you need to see exactly where the split falls.

Choosing a prefix size

Common practice: /24 for a typical office or home LAN (254 hosts), /25–/26 for carving a LAN into smaller segments, /30 for traditional point-to-point links (2 usable hosts), /31 on modern point-to-point links, and /32 for a single-host route such as a loopback. Bigger prefixes waste fewer addresses but leave no room to grow — size subnets for the hosts you will have, not just the hosts you have today. Pair this with the Number Base Converter when you need the same numbers in hex or octal.

Frequently asked questions

How many usable hosts are in a /24 subnet?
254. A /24 has 2^8 = 256 addresses, minus the network address and the broadcast address. The same rule gives 126 hosts in a /25, 62 in a /26, and 2 in a /30.
What is a wildcard mask?
The bitwise inverse of the subnet mask: where the mask has 1s the wildcard has 0s and vice versa. A /24 mask of 255.255.255.0 has wildcard 0.0.0.255. Wildcard masks appear in Cisco-style access lists and some routing protocols.
What do /31 and /32 mean?
A /32 is a single address — a host route. A /31 has only two addresses; on point-to-point links RFC 3021 allows both to be assigned to the link endpoints, even though classic rules reserve them as network and broadcast.
Keep going

Related math calculators