Subnet calculator
MDV ToolsGive an IPv4 address with a prefix or a netmask and read the whole block.
- Network
- Broadcast
- First host
- Last host
- Usable hosts
- Netmask
- Wildcard
- Addresses
- Kind
- Network in binary
How this works
An IPv4 address is one 32-bit number written as four bytes. The prefix says how many leading bits
name the network: /26 keeps 26 bits, so the mask is
255.255.255.192, the block holds 26 = 64 addresses, and the address you typed
is somewhere inside it. The page ANDs the address with the mask for the network, ORs it with the
wildcard for the broadcast, and counts the rest. A netmask may be typed instead of a prefix
(10.0.0.1 255.255.255.0), but only a contiguous one: 255.0.255.0 is
refused, because no prefix means that and the result would be a guess.
Usable hosts are the block minus the network and broadcast addresses, which is why a /24 carries 254
and not 256. Two prefixes break that rule and the page follows the standards rather than the
arithmetic: a /31 has no network or broadcast address — both of its two addresses
are usable, which is what RFC 3021 defines for point-to-point links — and a /32 is
a single host with no range at all. Leading zeros in an octet are refused too: 010 is
octal 8 to some tools and decimal 10 to others, and a subnet calculator that picks one silently is
worse than one that asks.
The kind line names the block the address belongs to from the registries: private ranges (10/8, 172.16/12, 192.168/16), carrier-grade NAT (100.64/10), loopback (127/8), link-local (169.254/16), multicast (224/4), the documentation ranges used in examples, and otherwise public address space. That is about the address itself, not about your network: whether it is reachable depends on routing, and no page can see that. IPv6 is a different address format and is refused here rather than half-handled.
Everything is worked out in this tab with plain 32-bit integer arithmetic. Nothing is uploaded and nothing you type is stored; the Dark button keeps its setting in this browser's local storage.