IPv4 Subnet Calculator

CIDR to network, mask, and host range.

Runs locally in your browser Report an issue
Subnet

Enter an address and prefix

Type an IPv4 address with a CIDR prefix like 192.168.1.10/24 to see the network and broadcast addresses, masks, usable host range, class, and a 32-bit binary view.

Runs entirely in your browser

Calculate an IPv4 subnet

Enter an IPv4 address with a CIDR prefix — for example 192.168.1.0/24 — and the calculator derives everything the prefix implies: the network and broadcast addresses, the subnet mask and its wildcard inverse, the first and last usable host, how many usable hosts the block holds, and the classful IP class. A 32-bit binary view shows how the mask splits the address into network and host portions. Point-to-point /31 links (RFC 3021) and single-host /32 routes are handled correctly — both addresses are usable on a /31, and a /32 is a single usable host. It is all plain integer arithmetic done in your browser, so nothing is uploaded.

Common questions

What does the CIDR number mean?

The number after the slash is how many leading bits of the 32-bit address are fixed as the network portion. /24 fixes the first 24 bits, leaving 8 bits (256 addresses) for hosts; /30 fixes 30 bits, leaving 2 bits (4 addresses). More bits in the prefix means a smaller subnet.

Why are usable hosts two fewer than total addresses?

In a normal subnet the first address is the network identifier and the last is the broadcast address, neither of which is assigned to a host — so a /24 has 256 total but 254 usable. The exceptions are /31 (RFC 3021 point-to-point, where both addresses are usable) and /32 (a single-host route).

What is the wildcard mask for?

The wildcard mask is the bitwise inverse of the subnet mask (for /24, mask 255.255.255.0 gives wildcard 0.0.0.255). Access-control lists and routing configs on Cisco-style gear match address ranges using the wildcard rather than the subnet mask.

Is the IP class still relevant?

Classful addressing (A/B/C/D/E based on the leading octet) was replaced by CIDR in practice, so the class is informational. The real subnet boundaries come from the CIDR prefix you enter, not the class.

Is my input uploaded anywhere?

No. The calculation is pure 32-bit integer math performed in your browser. Nothing you type is sent to a server, so it also works offline.