IP Subnet Calculator
Computes network, broadcast, wildcard, binary mask, and first/last usable host from IPv4 + mask or IPv6 + prefix, plus total addresses and neighbor subnets. IPv4 hosts follow special cases (/32 = 0, /31 = 2, else 2^(32 - p) - 2); IPv6 outputs add expanded, compressed, and reverse-DNS forms. An optional Network Class filter (A/B/C/Any) warns on out-of-class IPv4 octets.
This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.
Documentation
An IP subnet calculator derives network address, broadcast address, CIDR prefix, and usable host range for both IPv4 and IPv6 from a single address and mask or prefix length. IPv4 results add class, mask, wildcard, and binary mask; IPv6 results add expanded, compressed, and reverse DNS formats. Clean, normalized results speed up network design, change requests, and incident response.
- Accurate network, broadcast, and host ranges follow from any valid IPv4 or IPv6 input.
- Firewall rules, ACLs, and security groups validate against exact CIDR boundaries.
- DHCP scopes and address pools plan from clear usable host counts and neighbor subnets.
- Routing summaries and aggregation plans align prefixes to binary boundaries.
- Addressing issues diagnose by identifying private, link-local, loopback, multicast, and reserved blocks.
An address such as 192.0.2.10 or 2001:db8::1 combines with a subnet mask (IPv4) or a prefix length (IPv6, such as /64) to run the calculation. An optional Network Class filter (A, B, C, or Any) flags an IPv4 octet that falls outside the selected class.
- The summary table confirms the address family, prefix, and total addresses before the detail fields are read.
- Network address, range, host counts, and neighbor subnets all recompute together from the same input.
- Any result value copies cleanly for documentation, firewall changes, DHCP configuration, or routing updates.
- New VLANs, VPCs, or VNets plan without overlap across environments.
- NAT, VPN, and peering configurations verify against exact CIDR alignment.
- IPv6 deployments use /64 for SLAAC with a correct reverse DNS zone.
- Change tickets carry normalized network, broadcast, and range fields.
- Existing networks audit by classifying addresses as private, public, or reserved.
The Summary confirms CIDR and total addresses. Address Details gives subnet mask, wildcard mask, network address, broadcast address, first and last usable host, and binary mask. Neighbor Subnets or Sibling Prefixes shows the previous and next ranges, useful during route aggregation, DHCP sizing, and migration planning.
Example 1: 192.168.1.34/26 produces network 192.168.1.0/26, broadcast 192.168.1.63, and 62 usable hosts, enough to carve out a small server VLAN.
Example 2: 10.0.8.1/20 produces network 10.0.0.0/20 through 10.0.15.255, with 4094 usable hosts, enough to size a campus user segment.
Example 3: 2001:db8:abcd::1/64 produces a standard SLAAC subnet and a correct ip6.arpa reverse zone path, ready for forward and reverse DNS records on IPv6 services.
What is CIDR? CIDR is the prefix length that states how many leading bits define the network. For example, /24 means 24 network bits and 8 host bits.
Why do /31 and /32 look different? /31 supports point-to-point links with two usable addresses and no broadcast. /32 represents a single host and has no usable range.
Why is /64 common for IPv6? /64 enables Stateless Address Autoconfiguration and keeps host addressing consistent across networks.
Can every address be listed? Small ranges list every address inline; larger subnets offer a downloadable list instead, keeping the page responsive.
- IPv4 netmask from prefix p: netmask = (2^32 − 1) << (32 − p)
- Network address: IP AND netmask; Wildcard mask: NOT netmask; Broadcast: network OR wildcard
- Usable hosts (IPv4): p = 32 → 0; p = 31 → 2; else 2^(32 − p) − 2
- IPv6 network: keep first p bits, set remaining bits to 0; Reverse DNS: expand, reverse nibbles, append .ip6.arpa
Inputs, outputs, and what the IP Subnet Calculator computes
What the IP Subnet Calculator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.
Inputs
- IP Address (text input) · default: 75.147.189.97
- Any / Class A / Class B / Class C · default: Any
- Subnet Mask · default: 255.255.255.252 /30
- Prefix Length
Controls
Calculate · Reset
Computation
IPv4 netmask from prefix p: netmask = (2^32 − 1) << (32 − p)
Example
Example 1: 192.168.1.34/26 produces network 192.168.1.0/26, broadcast 192.168.1.63, and 62 usable hosts, enough to carve out a small server VLAN.