IP Subnet Calculator
Type any address with a prefix — 192.168.1.130/24 — and read everything the subnet implies: network and broadcast, the usable host range and count, the mask and its wildcard, in dotted decimal and in binary. Or start from a host count and get the tightest prefix that fits.
One number, thirty-two bits
Everything on this page is one operation: a 32-bit AND. The prefix says how many leading bits are network; the mask is those bits as ones; ANDing any address with it yields the subnet every router agrees on. Broadcast is the same network with the host bits set, and the usable range is what lies strictly between.
The hosts-to-prefix direction is the planning question — "I need 500 addresses" — and the answer steps in powers of two: 500 needs 9 host bits, so a /23, which actually carries 510. The spare capacity is not waste; it is the growth the next hire consumes.
Frequently asked questions
What do network and broadcast addresses actually do?
The network address names the subnet itself in routing tables and cannot be assigned to a machine; the broadcast address reaches every host on the subnet at once. That is why a /24 has 254 usable hosts, not 256 — the first and last addresses are spoken for.
How do I read a mask like 255.255.240.0?
As 20 ones followed by 12 zeros — the binary row shows it directly. The ones mark the network part, the zeros the host part, and the subnet boundary falls mid-octet: that 240 means the third octet contributes 4 network bits, which is why /20 networks step by 16 in the third octet.
What is the wildcard mask for?
It is the mask inverted — 0.0.0.255 for a /24 — and it is what Cisco ACLs and OSPF configuration expect instead of the mask. Same information, opposite convention; the tool prints both so nothing needs inverting by hand at 2 a.m.
Why do /31 and /32 get a special note?
The two-usable-hosts arithmetic breaks there: a /31 would have zero. RFC 3021 rescued it for point-to-point links — both addresses are hosts, no broadcast — and a /32 names exactly one host, the shape of loopbacks and route entries. The calculator says so instead of reporting zero and negative hosts.
Related tools
- What Is My IPYour public IP address, network location and connection details — fetched once from Cloudflare's trace endpoint, shown plainly, logged nowhere.
- DNS LookupA, AAAA, MX, TXT, CNAME, NS and more for any domain — queried over encrypted DNS (DoH), with TTLs shown the way an operator reads them.
- User Agent ParserPaste any user-agent string — or inspect your own — and get browser, version, engine, OS and device type, decoded by rules, not by a tracking database.