Subnet calculator
IPv4 or IPv6, detected as you type: live bit map, netmask, wildcard, first and last address, and what /31 and /32 really mean.
Enter a CIDR block above or pick an example.
What the calculator shows
Enter a complete IPv4 or IPv6 address and prefix. The calculator shows the canonical network, inclusive range, exact address count and a bit map separating network and host bits. IPv4 also shows the netmask, wildcard, broadcast where applicable and traditional usable-host range.
Special prefix rules
An IPv4 /31 uses both addresses on a point-to-point link, so neither is marked broadcast. A /32 names one address. IPv6 has no directed broadcast address; its range endpoints are included. Counts use exact integer arithmetic, including IPv6 /64 and larger blocks.
Parsing and privacy
Addresses and prefixes must match complete formats. The calculator does not remove extra characters, and scoped IPv6 addresses are refused for network math. Everything runs in your browser. A short input can be shared through a URL fragment that is not sent to the server.