What does this calculator do?
A subnet is the block of IPv4 addresses that share the same network prefix. This calculator takes an address such as 192.168.1.10 and a CIDR prefix such as /26 and returns the whole block exactly: the network address, the broadcast address, the subnet mask and its wildcard, the first and last usable addresses, the total address count, the conventional usable-host count, the host bits and the binary mask. The arithmetic is exact 32-bit integer arithmetic, so the results are exact values, not estimates. Two prefixes are handled on their own terms rather than forced into the classic model: a /31 is an RFC 3021 point-to-point link with two usable addresses and no broadcast, and a /32 is a single host address. Everything is computed in your browser from the values you type. Nothing is looked up on the network — there is no ping, no DNS query, no WHOIS and no geolocation.
Formula
The mask is a run of 1-bits; the network is the address with the host bits cleared, and the broadcast is the address with the host bits set.
hostBits = 32 − prefix totalAddresses = 2^hostBits network = address AND mask broadcast = network OR wildcard usableHosts = 2^hostBits − 2 (ordinary subnets) usableHosts = 2 (/31, RFC 3021) usableHosts = 1 (/32)
How to use it
Type the IPv4 address in dotted-decimal form — 192.168.1.10 — and the prefix length as a whole number between 0 and 32. Any address inside the block gives the same answer, so you can enter a host address rather than the network address. Malformed addresses, octets above 255 and prefixes outside /0–/32 are rejected with a specific message instead of a silent wrong answer.
Worked example
Address 192.168.1.10 with prefix /26: host bits = 32 − 26 = 6, so the block holds 2⁶ = 64 addresses. The mask is 255.255.255.192 and the wildcard is 0.0.0.63. The network is 192.168.1.0/26 and the broadcast is 192.168.1.63, leaving 192.168.1.1 to 192.168.1.62 — 62 usable hosts. The binary mask is 11111111.11111111.11111111.11000000.
Frequently asked questions
Why are two addresses missing from the usable host count?
In an ordinary subnet the first address identifies the network itself and the last is the subnet broadcast address, so neither can be assigned to a host. That is why a /26 with 64 addresses offers 62 usable hosts. The exception is /31 and /32, which do not follow this convention.
Why does a /31 show no broadcast address?
RFC 3021 defines /31 for point-to-point links, where both addresses are assigned to the two router interfaces. There is no network or broadcast address to reserve, so a /31 gives 2 usable addresses rather than 0.
What is the wildcard mask for?
It is the bitwise inverse of the subnet mask — 255.255.255.255 minus the mask. Access control lists on Cisco IOS and OSPF network statements match on the wildcard rather than the subnet mask, so /26 is written as 0.0.0.63.
Does this tool contact the address I enter?
No. There is no ping, DNS lookup, WHOIS query or geolocation. The address is only used as input to integer arithmetic that runs in your browser.
Sources
- RFC 4632 — Classless Inter-Domain Routing (CIDR): the address-block, prefix-length and aggregation model used for every IPv4 subnet result on this page.
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links: why a /31 has two usable addresses and no broadcast address, and why /32 is a single host.
- RFC 4291 — IP Version 6 Addressing Architecture: prefix and interface-identifier structure (IPv6 has no broadcast address). IPv6 output follows the canonical text form of RFC 5952.
- Reviewed: 2026-08-10
Related calculators
Last updated: 2026-08-10 · v1.0.0 · Report an error