IP Subnet Calculator
Free IPv4 subnet calculator. Enter an address and CIDR prefix for the network and broadcast addresses, usable host range, subnet and wildcard masks, and address counts.
What it works out
Enter an address with a CIDR prefix — 192.168.1.130/26 — and you get the network address, broadcast address, the usable host range, the subnet and wildcard masks, and how many addresses the block contains.
It's pure arithmetic, so it runs entirely in your browser. Nothing you type is sent to a server.
Reading CIDR notation
The number after the slash is how many bits are fixed as the network portion; the rest identify hosts inside it. A /24 fixes 24 bits and leaves 8 for hosts — 256 addresses, 254 usable. Every bit you add to the prefix halves the block.
Two addresses in an ordinary subnet aren't usable by hosts: the first (the network address, which names the subnet itself) and the last (the broadcast address). That's where "total minus two" comes from.
The /31 and /32 exceptions
The minus-two rule has two exceptions worth knowing, because most calculators get them wrong and report zero usable hosts.
A /31 is a point-to-point link. RFC 3021 says both addresses are usable, because with exactly two endpoints there's nothing to broadcast to and no need to name the subnet. A /32 is a single host — a loopback, a virtual IP, a firewall rule for one machine. This calculator handles both correctly.
FAQ
What's the difference between a subnet mask and a wildcard mask?
They're inverses. A subnet mask (255.255.255.192) marks the network bits with 1s. A wildcard mask (0.0.0.63) marks the host bits instead, and is what Cisco access lists and some routing protocols expect. Both describe the same boundary.
How many hosts fit in a /26?
64 addresses, 62 usable. Handy reference points: /24 = 254 usable, /25 = 126, /26 = 62, /27 = 30, /28 = 14, /29 = 6, /30 = 2.
Is this address private or public?
The calculator labels the scope: RFC 1918 private ranges (10.x, 172.16–31.x, 192.168.x), loopback, link-local (169.254.x), carrier-grade NAT (100.64.x), and multicast. Anything else is public.
Why does my /30 only have 2 usable hosts?
Four addresses, minus the network and broadcast addresses. /30 was the traditional choice for router-to-router links, which is exactly the case RFC 3021's /31 was introduced to make less wasteful.
Do you support IPv6 subnetting?
Yes — see the IPv6 toolkit for CIDR-to-range conversion and prefix maths. IPv6 has no broadcast address and no reserved host addresses, so the rules here don't carry over.
Background reading
See your own IP address, or the DNS glossary.