IP Address & Subnet Calculator
Enter any IPv4 or IPv6 address with a CIDR or subnet mask and get the network, broadcast, usable hosts, the full binary layout and a step-by-step worked example — plus subnet division and “is this IP in that subnet?” checks. 100% in your browser.
Type an address like 192.168.10.130/26 (or with a dotted mask:
192.168.10.130 255.255.255.192) and the calculator shows everything a subnet plan needs:
the network and broadcast addresses, the first and last usable hosts, the total and usable counts,
the mask and its wildcard inverse, and the address in binary with the network and host bits colour-coded.
Switch to the IPv6 tab for the same treatment on 128-bit addresses, or use the subnet divider to split a
network into smaller ones.
Analyse an IPv4 address or network
Accepts 192.168.1.100/24, 192.168.1.100 255.255.255.0, or a bare address
(shown as /32). It re-calculates live as you type.
Results
Binary view
The address and its mask, bit for bit. The first N bits (the prefix) are the network; the rest are host:
Worked example — how these numbers come out
The six steps the calculator just ran on your input:
Analyse an IPv6 address or network
Full or compressed form (the :: shorthand works), with /prefix or a
space-separated prefix. Re-calculates live as you type.
Results
Binary view
All 128 bits, grouped by 16 (one group per hextet). Blue is the network prefix, orange is the host part:
Worked example — how these numbers come out
Split a network into subnets
Enter any IPv4 or IPv6 network and split it two ways: into N subnets (the calculator picks the prefix for you — subnets come in powers of two), or list every subnet of a chosen prefix. Works for both families.
Is this IP in that subnet?
The classic troubleshooting question — answered with the bitwise proof, not just a yes or no.
Worked example, step by step
Take 192.168.10.130/26. Here is exactly how the calculator turns it into a network, a
broadcast and a host count — the same six steps it runs on whatever you type above, with the
real bits from this address:
Read the fourth octet and the answer is obvious: 130 is 10000010 in binary.
A /26 keeps the first two bits of the fourth octet (10) and zeroes the rest, so the
network lands on 10000000 = 128 — not on 0, not on 130. That “which /26
block am I in?” question is exactly what this tool answers for any address, any prefix.
Splitting a network, worked
Suppose a site has 172.16.0.0/16 (65,536 addresses) and needs four separate subnets.
Four is 2², so borrow two bits from the host part: /16 + 2 = /18. Each /18 then holds
214 = 16,384 addresses (16,382 usable). The divider above produces exactly this table:
CIDR cheat sheet
The prefixes you will meet in the wild, with what each one buys you:
| CIDR | Subnet mask | Addresses | Usable hosts | Typical use |
|---|---|---|---|---|
/8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A default; a huge campus |
/16 | 255.255.0.0 | 65,536 | 65,534 | Class B default; a large LAN or a /16 of a /8 |
/24 | 255.255.255.0 | 256 | 254 | Class C default; the typical office VLAN |
/26 | 255.255.255.192 | 64 | 62 | A /24 split into four |
/28 | 255.255.255.240 | 16 | 14 | A small team or a rack of gear |
/30 | 255.255.255.252 | 4 | 2 | Router-to-router links (the classic) |
/31 | 255.255.255.254 | 2 | 2 | Point-to-point links (RFC 3021) — both addresses usable |
/32 | 255.255.255.255 | 1 | 1 | A single host, or a loopback in a routing table |
Private and special ranges (IPv4)
Not every address is publicly routable. The calculator classifies every input against these ranges,
so a paste of 10.20.30.40 tells you “private” before you plan anything:
| Range | Addresses | Purpose |
|---|---|---|
10.0.0.0/8 | 16,777,216 | Private (RFC 1918) — the largest private block |
172.16.0.0/12 | 1,048,576 | Private (RFC 1918) |
192.168.0.0/16 | 65,536 | Private (RFC 1918) — the classic home/office LAN |
127.0.0.0/8 | 16,777,216 | Loopback — always routes to the local host |
169.254.0.0/16 | 65,536 | Link-local (APIPA) — self-assigned when DHCP fails |
100.64.0.0/10 | 4,194,304 | Carrier-grade NAT (RFC 6598) |
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | 2,048 | Documentation (RFC 5737) — reserved for examples |
198.18.0.0/15 | 1,048,576 | Benchmarking (RFC 2544) |
224.0.0.0/4 | 268,435,456 | Multicast (class D) |
240.0.0.0/4 | 268,435,456 | Reserved (class E) |
Classful vs classless
Before CIDR, networks came in three fixed sizes. The calculator still shows the class because legacy docs and old exams refer to it — but in 2026 the class is trivia and the prefix is everything:
| Class | First octet | Default mask | Networks |
|---|---|---|---|
| A | 1–126 | /8 (255.0.0.0) | 126 |
| B | 128–191 | /16 (255.255.0.0) | 16,382 |
| C | 192–223 | /24 (255.255.255.0) | 2,097,152 |
| D | 224–239 | — | Multicast |
| E | 240–255 | — | Reserved |
IPv6 in a minute
An IPv6 address is 128 bits, written as eight groups of four hex digits. The calculator accepts
compressed form (2001:db8::1) and expands it for you. The prefixes worth knowing:
| Prefix | Meaning |
|---|---|
2000::/3 | Global unicast — publicly routable |
fe80::/10 | Link-local — every interface gets one automatically |
fc00::/7 | Unique local address (ULA) — the “private” site space |
::1/128 | Loopback |
::/128 | Unspecified (“no address”) |
ff00::/8 | Multicast — replaces IPv4 broadcast entirely |
2001:db8::/32 | Documentation — reserved for examples |
::ffff:0:0/96 | IPv4-mapped — an IPv4 address in IPv6 clothing |
Two things that trip people up: /64 is the standard interface prefix (SLAAC builds the
host part from the interface identifier, so networks smaller than /64 break autoconfiguration), and
a ULA is “private” in the sense of site-scoped — it is still a fully routable
address, just not one your ISP will advertise.
Common subnet pitfalls
- The “minus two” rule has exceptions. A /30 really does have 2 usable hosts, but a /31 has 2 usable (RFC 3021 point-to-point — no broadcast at all) and a /32 has 1. Old muscle memory says /31 is “invalid”; it is not.
- Masks must be contiguous.
255.255.255.0is a /24, but255.0.255.0is not a mask at all — the 1-bits are not in one block. This tool rejects it instead of guessing. - Leading zeros are ambiguous.
192.168.001.001could be decimal or octal depending on the parser. This tool rejects leading zeros so every input means exactly one address. - Mask vs wildcard. A subnet mask has 1s where the network is; the wildcard (inverse) mask has 1s where the host is. Firewall ACLs and routing configs use the wildcard — mixing them up is a classic misfire. Both are shown in the results.
- A /32 is a host, not a network. In a routing table
1.2.3.4/32means “that one machine”; the network, broadcast and host addresses are all the same. - IPv6 has no broadcast. There is no 255.255.255.255 equivalent — multicast (including the all-nodes
ff02::1) replaces it. “Broadcast address” questions in IPv6 are a category error. - Don't plan a /25 from a /26. Subnets split in powers of two: a /24 divides cleanly into two /25s, four /26s, eight /27s — never three. The divider above will tell you when your N forces the next power of two.
- Private does not mean safe. RFC 1918 addresses are not routable from the internet, but they are fully visible on your own network. Segment them; don't assume privacy.
More network tools
Reading a packet capture and seeing an HTTP status code you don't recognise? The HTTP Status Code Lookup explains every one with common causes and fixes, and the Unix Timestamp Converter decodes the epoch times that show up in logs and pcap headers.