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.

🔒 100% private — nothing is uploaded or stored. Every calculation, binary layout, subnet split and export runs entirely in your browser. Enter addresses from production networks or customer infrastructure freely — nothing is sent to our servers, written to disk, or logged, and the page keeps working if your internet connection drops.

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.

Enter an IPv4 address with a /prefix or a subnet mask to begin.

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.

Enter a network to split, e.g. 192.168.0.0/16 or 2001:db8::/48.

Is this IP in that subnet?

The classic troubleshooting question — answered with the bitwise proof, not just a yes or no.

in

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:

CIDRSubnet maskAddressesUsable hostsTypical use
/8255.0.0.016,777,21616,777,214Class A default; a huge campus
/16255.255.0.065,53665,534Class B default; a large LAN or a /16 of a /8
/24255.255.255.0256254Class C default; the typical office VLAN
/26255.255.255.1926462A /24 split into four
/28255.255.255.2401614A small team or a rack of gear
/30255.255.255.25242Router-to-router links (the classic)
/31255.255.255.25422Point-to-point links (RFC 3021) — both addresses usable
/32255.255.255.25511A 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:

RangeAddressesPurpose
10.0.0.0/816,777,216Private (RFC 1918) — the largest private block
172.16.0.0/121,048,576Private (RFC 1918)
192.168.0.0/1665,536Private (RFC 1918) — the classic home/office LAN
127.0.0.0/816,777,216Loopback — always routes to the local host
169.254.0.0/1665,536Link-local (APIPA) — self-assigned when DHCP fails
100.64.0.0/104,194,304Carrier-grade NAT (RFC 6598)
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/242,048Documentation (RFC 5737) — reserved for examples
198.18.0.0/151,048,576Benchmarking (RFC 2544)
224.0.0.0/4268,435,456Multicast (class D)
240.0.0.0/4268,435,456Reserved (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:

ClassFirst octetDefault maskNetworks
A1–126/8 (255.0.0.0)126
B128–191/16 (255.255.0.0)16,382
C192–223/24 (255.255.255.0)2,097,152
D224–239—Multicast
E240–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:

PrefixMeaning
2000::/3Global unicast — publicly routable
fe80::/10Link-local — every interface gets one automatically
fc00::/7Unique local address (ULA) — the “private” site space
::1/128Loopback
::/128Unspecified (“no address”)
ff00::/8Multicast — replaces IPv4 broadcast entirely
2001:db8::/32Documentation — reserved for examples
::ffff:0:0/96IPv4-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.0 is a /24, but 255.0.255.0 is 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.001 could 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/32 means “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.


Luke Keam
Thank you for reading. Email me: [email protected]
Luke Keam | techgeek.biz