IP Subnet Calculator
Compute IPv4 subnet masks, CIDR network notation, usable host IP ranges, broadcast addresses, wildcard masks, and binary bitwise breakdowns instantaneously.
Comprehensive Subnet Specifications
| Parameter | Value / Configuration |
|---|---|
| Input IP Address | 192.168.1.100 |
| CIDR Prefix Notation | /24 |
| Subnet Mask (Dotted Decimal) | 255.255.255.0 |
| Wildcard / Inverse Mask | 0.0.0.255 |
| Network Address | 192.168.1.0 |
| Broadcast Address | 192.168.1.255 |
| First Usable Host IP | 192.168.1.1 |
| Last Usable Host IP | 192.168.1.254 |
| Total IPv4 Addresses | 256 (28) |
| Usable Host Addresses | 254 (28 − 2) |
| IP Class & Routing Scope | Class C RFC 1918 Private |
| Subnet Mask (Hexadecimal) | 0xFFFFFF00 |
| In-addr.arpa Reverse DNS Zone | 1.168.192.in-addr.arpa |
| IPv4-Mapped IPv6 Address | ::ffff:192.168.1.100 |
Step-by-Step Bitwise Calculation Logic
Under the hood, network hardware executes binary bitwise Boolean logic at wirespeed. Here is the exact bitwise computation executed for this subnet:
IPv4 Subnet Cheat Sheet & CIDR Reference Table
| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts | Common Use Case |
|---|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | Single host route, loopback interface |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | Point-to-point links (RFC 3021) |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | Legacy point-to-point router links |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | Small DMZ, ISP router blocks |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | Small server farm, branch office LAN |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | Departmental VLAN (30 workstations) |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | Medium office subnets |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | Half-class C subnetting |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | Standard local LAN / Home Wi-Fi |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | Enterprise floor VLAN, DHCP pool |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | Large corporate campus networks |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | Cloud VPC subnet (AWS / GCP / Azure) |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | Standard Cloud VPC / Class B |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | Large Telco / ISP backbone / Class A |
What is an IP Subnet & How Does CIDR Work?
An IPv4 address is a 32-bit integer formatted into four 8-bit octets separated by dots (e.g. 192.168.1.100). Subnetting is the practice of dividing a single physical or virtual network into smaller logical sub-networks (subnets). Every IP address is bifurcated into two distinct segments:
- Network Portion: Identifies the specific network or subnetwork boundary. All hosts within the same subnet share the exact same network prefix.
- Host Portion: Uniquely identifies an individual network interface or device within that subnet.
Historically, networks were divided into rigid classes (Class A, B, and C). In 1993, the Internet Engineering Task Force (IETF) introduced Classless Inter-Domain Routing (CIDR) via RFC 1519 (updated by RFC 4632) to eliminate address depletion and enable flexible prefix lengths designated by a slash followed by the number of network bits (such as /24).
Why Subnetting is Essential for Modern Network Architecture
- Broadcast Domain Containment: Ethernet switches forward broadcast frames (such as ARP requests) to every port in the broadcast domain. Without subnetting, thousands of devices flooding broadcasts degrade network performance (broadcast storms).
- Network Security & Segmentation: By partitioning networks into distinct subnets (e.g., Guest Wi-Fi, Corporate LAN, IoT Devices, Database Tier), network engineers can apply Access Control Lists (ACLs) and firewall inspection policies between subnets.
- Optimized Routing Tables: Route summarization (supernetting) allows edge routers to advertise one consolidated CIDR prefix rather than hundreds of individual routes, reducing routing table memory and convergence latency across the Internet backbone.
- Cloud VPC Planning: Cloud platforms like AWS, Google Cloud, and Microsoft Azure require architecting Virtual Private Clouds (VPCs) with non-overlapping subnets across multiple availability zones.
How to Calculate Subnets Manually: Key Mathematical Formulas
To calculate subnet boundaries manually or programmatically, apply these universal formulas where n represents the CIDR prefix length (number of network bits), and h = 32 − n represents the host bits:
- Total Addresses:
Total = 2h = 2(32 − n) - Usable Hosts (Standard /0 to /30):
Usable = 2h − 2. We subtract 2 because the very first address represents the Network Identifier and the last address is reserved for the Subnet Directed Broadcast. - RFC 3021 Exception (/31): Point-to-point links have exactly 2 total addresses, and both are usable hosts (usable = 2). Broadcast and network identifiers are omitted to conserve IPv4 space.
- Single Host (/32): Represents an explicit interface route or loopback interface with exactly 1 usable address (usable = 1).
- Wildcard Mask: The bitwise complement (inverse) of the subnet mask, calculated as
255.255.255.255 − Subnet Mask. Used extensively in Cisco ACLs and OSPF area configurations.
Frequently Asked Questions (FAQ)
What is the difference between /24 and /23 subnets?
What are RFC 1918 Private IP Address ranges?
- 10.0.0.0 to 10.255.255.255:
10.0.0.0/8(16,777,216 addresses) - 172.16.0.0 to 172.31.255.255:
172.16.0.0/12(1,048,576 addresses) - 192.168.0.0 to 192.168.255.255:
192.168.0.0/16(65,536 addresses)
Why can't I use the first and last IP address in a standard subnet?
How does a /31 subnet work without a network or broadcast address?
What is a Wildcard Mask and where is it used?
255.255.255.0 has a wildcard mask of 0.0.0.255. Wildcard masks are primarily used in Cisco IOS Access Control Lists (ACLs) and dynamic routing protocols like OSPF and EIGRP to filter traffic.