IP Subnet & CIDR Calculator
IP Subnet & CIDR Network Calculator
Professional online network subnet calculator. Calculate Network ID, Broadcast IP, Usable Host Range, Subnet Mask, Wildcard Mask, Binary IP, and VLSM Subnet Divisions in real-time.
Network Parameters
Calculation Results
Binary Bitwise Architecture (32-Bit Representation)
Network Bits (1s) • Host Bits (0s)Subnet Division & Sub-Network Splitter
| Subnet # | Network CIDR | Usable Host Range | Broadcast IP | Usable Hosts | Action |
|---|
IPv4 CIDR to Subnet Mask Reference Cheat Sheet
Standard /0 through /32 IPv4 prefixes| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts | Typical Use Case |
|---|---|---|---|---|---|
/32 |
255.255.255.255 | 0.0.0.0 | 1 | 1 (Host Route) | Single device / Loopback IP |
/31 |
255.255.255.254 | 0.0.0.1 | 2 | 2 (RFC 3021) | Point-to-Point Router Links |
/30 |
255.255.255.252 | 0.0.0.3 | 4 | 2 | Legacy PtP links / Serial |
/29 |
255.255.255.248 | 0.0.0.7 | 8 | 6 | Small branch office / Public block |
/28 |
255.255.255.240 | 0.0.0.15 | 16 | 14 | DMZ Subnet / Small server farm |
/27 |
255.255.255.224 | 0.0.0.31 | 32 | 30 | Department LAN (Up to 30 PCs) |
/26 |
255.255.255.192 | 0.0.0.63 | 64 | 62 | Medium department / Wi-Fi zone |
/25 |
255.255.255.128 | 0.0.0.127 | 128 | 126 | Large corporate floor / VLAN |
/24 |
255.255.255.0 | 0.0.0.255 | 256 | 254 | Standard Class C / Default Home LAN |
/23 |
255.255.254.0 | 0.0.1.255 | 512 | 510 | Dual-block building LAN |
/22 |
255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | University Campus / Enterprise Wi-Fi |
/20 |
255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | Cloud VPC / AWS Subnet |
/16 |
255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | Standard Class B Enterprise Network |
/8 |
255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | Standard Class A Global Block (10.0.0.0/8) |
Understanding IP Subnetting, CIDR, and VLSM
Subnetting is the fundamental networking process of partitioning a single physical network into multiple logical sub-networks. This improves network security, reduces broadcast traffic congestion, and conserves valuable IPv4 address space.
1. How Does CIDR (Classless Inter-Domain Routing) Work?
In traditional classful networking (Class A, B, C), address blocks were fixed and highly wasteful. Introduced in 1993, CIDR allows variable-length subnet masking denoted by a prefix slash (e.g. /24). The prefix number specifies exactly how many high-order bits represent the Network ID, with the remainder allocated for Host addresses.
2. Private IP Address Ranges (RFC 1918)
The Internet Engineering Task Force (IETF) reserved three dedicated IPv4 blocks for private local area networks that never route directly across the public Internet:
- 10.0.0.0 /8: 10.0.0.0 to 10.255.255.255 (16,777,216 addresses) — Large corporate enterprises and cloud data centers.
- 172.16.0.0 /12: 172.16.0.0 to 172.31.255.255 (1,048,576 addresses) — Medium-sized multi-site business networks.
- 192.168.0.0 /16: 192.168.0.0 to 192.168.255.255 (65,536 addresses) — Small office / home office (SOHO) Wi-Fi routers.
3. Calculating Network ID, Broadcast, and Usable Hosts
To find the Network ID, perform a bitwise AND operation between the 32-bit IP address and the subnet mask. The Broadcast IP is calculated by performing a bitwise OR with the inverted wildcard mask. The usable host range spans from Network ID + 1 to Broadcast IP - 1, yielding a total usable host capacity of 2^(32 - CIDR) - 2.
All IP calculations, binary bitwise operations, and subnet splits run locally inside your browser runtime. No network configurations or private IP schemes are ever sent to remote servers.
Frequently Asked Questions
Clear technical answers regarding subnetting formulas, point-to-point links, and wildcard masks.
Why are two IP addresses subtracted when calculating usable hosts?
In standard IPv4 subnets, the very first IP address in the block is reserved as the Network Address (ID) to identify the subnet itself to routers, and the very last IP address is reserved as the Broadcast Address to transmit packets to all hosts simultaneously. Neither can be assigned to individual endpoints.
What is RFC 3021 and why does a /31 subnet have 2 usable hosts?
RFC 3021 establishes a special exception for Point-to-Point (PtP) router interconnects. Because there are only two routers on a direct cable link, dedicated network IDs and broadcast addresses are unnecessary. A /31 prefix provides exactly 2 IPs, conserving IPv4 space without wasting 50% of the addresses as a /30 subnet does.
What is a Wildcard Mask and where is it used?
A Wildcard Mask is the exact bitwise inverse of a subnet mask (calculated as 255.255.255.255 - Subnet Mask). It is primarily used in Cisco IOS Access Control Lists (ACLs) and OSPF routing protocol configuration to indicate which bit positions to match (0 = must match, 1 = ignore).
What is VLSM (Variable Length Subnet Masking)?
VLSM is the network design practice of dividing a larger subnet into multiple smaller subnets of varying prefix lengths based on exact host requirements. For example, allocating a /26 for a 50-person department and a /30 for a server-to-switch uplink from the same parent /24 network.