Overview of IPv4 Subnetting
An Internet Protocol Version 4 (IPv4) address is a 32-bit numerical identifier typically written as four decimal octets separated by periods (for example, 192.168.1.1). Subnetting is the practice of logically dividing a physical IP network into smaller, manageable sub-networks (subnets).
By segmenting an IP network into subnets, systems administrators improve network routing efficiency, reduce broadcast storm overhead, and enforce stricter security boundaries between departments, servers, and demilitarized zones (DMZs).
How to Use This Subnet Calculator
- Enter Your IPv4 Address: Type in any valid unicast or private IPv4 address (e.g.,
192.168.1.1or10.0.0.1). - Select CIDR Prefix: Choose the Classless Inter-Domain Routing prefix (from
/0down to/32) from the dropdown, or pick one of the quick preset buttons for common architectures (/24,/16,/28, etc.). - Inspect Output Specifications: The tool immediately recalculates the network base address, broadcast address, netmask, wildcard mask, and usable host range in real time.
- Copy Results: Click the COPY button next to any value to copy it directly into your terminal or router configuration script.
The Subnetting Formula & Bitmask Logic
Every IPv4 address consists of two parts: the Network ID and the Host ID. The subnet mask dictates where the network portion ends and the host portion begins:
Why subtract 2?
In standard IPv4 networking, two addresses in every subnet are strictly reserved:
- Network Address: The all-zeros host address (identifies the subnet itself).
- Broadcast Address: The all-ones host address (used to packet-broadcast to every host on that specific subnet). (Exception:
/31subnets defined by RFC 3021 for point-to-point links allow 2 usable host addresses without broadcast).
Bitwise Calculation Process:
- Network Address: Performed via bitwise AND between the 32-bit IP address and the 32-bit Subnet Mask:
Network = IP & SubnetMask - Broadcast Address: Performed via bitwise OR between the Network Address and the Wildcard (inverted) mask:
Broadcast = Network | (~SubnetMask)
Standard CIDR Subnet Cheat Sheet
| CIDR Prefix | Subnet Mask | Total Addresses | Usable Hosts | Common Use Case |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point router uplinks |
| /29 | 255.255.255.248 | 8 | 6 | Small server racks, DMZ subnets |
| /28 | 255.255.255.240 | 16 | 14 | Small office branches |
| /27 | 255.255.255.224 | 32 | 30 | Department subnets |
| /26 | 255.255.255.192 | 64 | 62 | Large VLANs |
| /24 | 255.255.255.0 | 256 | 254 | Standard Class C LAN / Home WiFi |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Enterprise infrastructure, Cloud VPCs |
Frequently Asked Questions (FAQ)
What is the difference between a Subnet Mask and a Wildcard Mask?
A Subnet Mask uses contiguous 1s from the left to denote the network prefix and 0s for the host portion (e.g., 255.255.255.0). A Wildcard Mask is the mathematical inverse (0.0.0.255), predominantly used in Cisco Access Control Lists (ACLs) and OSPF routing configurations to match ranges of packets.
Does this calculator transmit my IP address to any server?
No. All calculations are executed 100% locally in your web browser using client-side JavaScript. TechHub never logs, transmits, or records your private IP addresses or network topology.
What are Private IPv4 Address Ranges (RFC 1918)?
The Internet Assigned Numbers Authority (IANA) reserved three blocks of IPv4 space for private local networks:
10.0.0.0to10.255.255.255(10.0.0.0/8)172.16.0.0to172.31.255.255(172.16.0.0/12)192.168.0.0to192.168.255.255(192.168.0.0/16)