IP Subnet Calculator
IPv4 subnetting made easy
Input Mode
IP Address
Binary Representation
Address Details
Network vs Host Bits
Host Capacity
CIDR to Subnet Mask Reference Table
Quick reference for all CIDR prefix lengths and their corresponding subnet masks
| CIDR | Subnet Mask | Wildcard | Total Hosts | Usable Hosts | Class |
|---|
Private IP Address Ranges
These IP ranges are reserved for private networks and cannot be routed on the public internet
Understanding IP Subnetting
What is Subnetting?
Subnetting is the process of dividing a large network into smaller, more manageable sub-networks (subnets). This helps improve network performance, security, and organization.
Subnet Mask
A subnet mask is a 32-bit number that divides an IP address into network and host portions. The "1" bits represent the network portion, and the "0" bits represent the host portion.
- 255.255.255.0 = /24 (8 host bits = 256 hosts)
- 255.255.0.0 = /16 (16 host bits = 65,536 hosts)
- 255.0.0.0 = /8 (24 host bits = 16,777,216 hosts)
CIDR Notation
CIDR (Classless Inter-Domain Routing) notation uses a slash (/) followed by the number of network bits. For example:
- 192.168.1.0/24 means 24 bits for network, 8 bits for hosts
- 10.0.0.0/8 means 8 bits for network, 24 bits for hosts
- 172.16.0.0/12 means 12 bits for network, 20 bits for hosts
Calculating Subnets
Key formulas for subnet calculations:
- Network Address: IP address AND subnet mask
- Broadcast Address: Network address OR (NOT subnet mask)
- Total Hosts: 2^(number of host bits)
- Usable Hosts: Total hosts - 2 (network + broadcast)
- Wildcard Mask: NOT subnet mask (inverse)
Common Subnet Sizes
- /30 (255.255.255.252): 2 usable hosts - Point-to-point links
- /29 (255.255.255.248): 6 usable hosts - Small networks
- /28 (255.255.255.240): 14 usable hosts - Small offices
- /27 (255.255.255.224): 30 usable hosts - Medium networks
- /26 (255.255.255.192): 62 usable hosts - Larger networks
- /25 (255.255.255.128): 126 usable hosts - Large networks
- /24 (255.255.255.0): 254 usable hosts - Standard LAN
Subnetting Best Practices
Plan Ahead
Plan your subnet structure before implementation. Consider future growth and expansion needs.
Use Hierarchical Design
Organize subnets hierarchically for easier management and routing efficiency.
Security Segmentation
Use subnets to segment networks for security (e.g., separate guest, employee, and server networks).
Right-Size Subnets
Choose subnet sizes that match your needs. Avoid wasting IP addresses with oversized subnets.
Understanding IP Subnetting
IP subnetting is a fundamental networking concept that allows network administrators to divide a large network into smaller, more manageable sub-networks. This improves network performance, enhances security, and simplifies network management.
Key Concepts
Understanding these key concepts is essential for effective subnetting:
- IP Address: A 32-bit number that uniquely identifies a device on a network (e.g., 192.168.1.1)
- Subnet Mask: A 32-bit number that divides the IP address into network and host portions
- CIDR Notation: A compact representation of IP address and subnet mask (e.g., 192.168.1.0/24)
- Network Address: The first address in a subnet, identifies the network itself
- Broadcast Address: The last address in a subnet, used to send data to all hosts
- Host Range: The range of usable IP addresses between network and broadcast addresses
IP Address Classes
Traditional IP address classification:
- Class A: 1.0.0.0 - 126.255.255.255 (Default mask: 255.0.0.0 or /8)
- Class B: 128.0.0.0 - 191.255.255.255 (Default mask: 255.255.0.0 or /16)
- Class C: 192.0.0.0 - 223.255.255.255 (Default mask: 255.255.255.0 or /24)
- Class D: 224.0.0.0 - 239.255.255.255 (Multicast addresses)
- Class E: 240.0.0.0 - 255.255.255.255 (Reserved for experimental use)
Common Use Cases
IP subnet calculators are essential for:
- Network Design: Planning network topology and IP address allocation
- Network Troubleshooting: Identifying network and broadcast addresses
- Security Configuration: Setting up firewalls and access control lists
- Exam Preparation: Studying for networking certifications (CCNA, Network+)
- Documentation: Creating network documentation and diagrams
Using This Calculator
Follow these steps:
- Step 1: Choose input mode (CIDR notation or subnet mask)
- Step 2: Enter the IP address (e.g., 192.168.1.0)
- Step 3: Enter CIDR prefix (e.g., 24) or subnet mask (e.g., 255.255.255.0)
- Step 4: Click "Calculate" to see all subnet information
- Step 5: View network address, broadcast address, host range, and more
- Step 6: Check the binary representation for detailed bit analysis
- Step 7: Use the CIDR Table for quick reference
More Computer & Network Calculators
Explore more computer and network calculators in our Computer Calculators category, including binary converter, IP subnet calculator, and bandwidth calculator!