Subnet Calculator

Enter a CIDR block and get the full breakdown — network, broadcast, usable range, masks and binary — computed locally, for IPv4 or IPv6.

4 dot-separated octets (0–255) followed by /0–/32
✕ {{ipv4.error}}
{{ipv4.note}}
full or :: compressed address followed by /0–/128
✕ {{ipv6.error}}
Result
Network {{ipv4.network}} ✓ copied
Broadcast {{ipv4.broadcast}} ✓ copied
First usable {{ipv4.first}} ✓ copied
Last usable {{ipv4.last}} ✓ copied
Netmask {{ipv4.netmask}} ✓ copied
Wildcard mask {{ipv4.wildcard}} ✓ copied
Total addresses {{ipv4.total}} ✓ copied
Usable hosts {{ipv4.usable}} ✓ copied
Class {{ipv4.cls}} ✓ copied

legacy classification, not an operational rule for CIDR

Binary
IP
Netmask

network bits   host bits

Result
Prefix {{ipv6.prefixLabel}} ✓ copied
Network (compressed) {{ipv6.networkCompressed}} ✓ copied
Network (expanded) {{ipv6.networkExpanded}} ✓ copied
Last address (compressed) {{ipv6.lastCompressed}} ✓ copied
Last address (expanded) {{ipv6.lastExpanded}} ✓ copied
Total addresses 2^{{ipv6.hostBits}} ({{ipv6.totalDecimal}}) ✓ copied
About this tool

Given a CIDR block, this masks the address to find the network, flips the host bits to find the broadcast (IPv4 only), and derives the usable host range, netmask and wildcard mask from the prefix length.

IPv6 has no broadcast address and uses 128-bit arithmetic (via BigInt) instead of 32-bit, so results show the compressed and expanded forms of the network and last address in the block.

All parsing and math happen locally in your browser. Nothing you enter is sent anywhere.