IPv4 CIDR & IPv6 /64 Math9 min readUpdated on
IPv4 & IPv6 Subnetting, CIDR Math & Network Architecture Guide
Learn how binary subnet masking works, calculate network and broadcast addresses, compute usable host IP ranges, and explore IPv6 prefix math.
W
WEBioDD Engineering Team•100% In-Browser & Zero-Trust
Key Takeaways
- IPv4 addresses are 32-bit numbers divided into 4 octets (8 bits each); CIDR prefixes define how many leading bits belong to the network prefix.
- The Network Address has all host bits set to 0; the Broadcast Address has all host bits set to 1.
- Usable host IP capacity is calculated as 2^(32 - CIDR) - 2 (subtracting network and broadcast addresses).
- IPv6 uses 128-bit addresses, with /64 being the standard unicast subnet size providing 1.84 × 10^19 addresses.
100% In-Browser & Local Execution
Calculate IP Subnets & CIDR Ranges
Compute IPv4 subnet masks, wildcard masks, network/broadcast IPs, usable host counts, and binary bit representations in real-time.
- IPv4 CIDR prefixes /8 to /32
- Network & broadcast address math
- Usable IP host range calculator
- Binary bitwise mask visualizer
01.Binary Arithmetic & Bitwise Masking in IPv4 Networks
An IPv4 address consists of 32 binary bits. Subnet masks (e.g., 255.255.255.0 or /24) perform a bitwise logical AND with the IP address to isolate the Network ID from the Host ID. For example, 192.168.1.55 AND 255.255.255.0 yields the network address 192.168.1.0.
02.Calculating Usable Hosts, Wildcard Masks & Ranges
For a given prefix length N, the host bit count is H = 32 - N. Total addresses equal 2^H, while usable host addresses equal 2^H - 2. The Wildcard Mask is the bitwise inverse of the subnet mask (e.g., 0.0.0.255 for /24), commonly used in Cisco ACLs and OSPF configurations.
How to Calculate Subnets and IP Ranges
Step-by-step subnet calculation workflow.
1
Enter IP Address
Type your target IPv4 address (e.g., 10.0.0.1 or 192.168.10.0).
2
Select CIDR Prefix or Mask
Choose the subnet mask from the CIDR dropdown (/8 to /32).
3
Inspect Network Coordinates
Review the calculated Network Address, Broadcast Address, and Subnet Mask.
4
Check Usable Host Range
View the exact first usable IP, last usable IP, and total assignable host count.
Frequently Asked Questions
The first address is reserved as the Network ID (all host bits 0), and the last address is reserved as the Broadcast address (all host bits 1).