IP Subnet Calculator
Calculate network details, host ranges, and subnet divisions
Subnet Division
Divide current network into smaller subnetsNetwork Information
Core Network Details
-
-
-
-
-
-
-
-
Host Capacity
-
-
-
-
-
-
IPv6 Information
-
-
-
-
-
-
Subnet Division Results
| # | Network | Mask | Host Range | Broadcast | Hosts |
|---|
Using The Subnet Calculator
This calculator provides comprehensive subnet information for both IPv4 and IPv6 addresses.
IPv4 Calculations
CIDR Notation: Enter addresses like 192.168.1.0/24 for quick calculations.
Decimal Notation: Enter IP address and subnet mask separately. Use the preset selector for common masks.
Results: Network address, broadcast, usable host range, subnet information, and multiple format conversions appear immediately in the right column.
IPv6 Calculations
Enter IPv6 addresses with prefix length (e.g., 2001:db8::/64).
The calculator expands abbreviated addresses, determines address type, and calculates total available addresses for the prefix length.
IPv6 calculations don’t require subnet division since standard /64 subnets provide virtually unlimited addresses.
Subnet Division
After calculating an IPv4 subnet, use the division tool in the left column to split it into smaller subnets.
By Subnet Count: Specify how many subnets you need.
By Host Count: Specify how many hosts each subnet should support.
CIDR Notation Reference
Quick reference for converting between CIDR notation and subnet masks:
| CIDR | Subnet Mask | Wildcard Mask | Usable Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 0.0.0.255 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2* |
| /32 | 255.255.255.255 | 0.0.0.0 | 1* |
* /31 networks support 2 usable addresses (RFC 3021). /32 networks contain a single host address.
Quick Conversion Methods
- CIDR to subnet mask: Memorize common values or use the calculator above
- Subnet mask to CIDR: Count consecutive 1-bits in binary representation
- Calculate hosts: 2(32-prefix) – 2 (except /31 and /32)
Network Planning Shortcuts
The “256 Minus” Trick
Find subnet increment in any octet:
Increment = 256 – Mask Octet
Use this increment to count through subnets: 0, 64, 128, 192…
Host Count Quick Math
Calculate available hosts from subnet mask:
Total IPs = 2n where n = # of 0 bits
Usable = 2n – 2
Finding Network Addresses
- Network address: IP AND Subnet Mask
- Broadcast address: IP OR Wildcard Mask
- First host: Network address + 1
- Last host: Broadcast address – 1
Common Subnet Sizes and Uses
/24 (256 IPs, 254 hosts)
Standard subnet for small to medium networks.
- Small office LANs
- Home networks
- Default router subnet
- Enterprise building blocks
/27 to /29 (32-8 IPs)
Small segments requiring isolation.
- Guest WiFi networks
- VoIP phone subnets
- IoT device isolation
- Management networks
/30 (4 IPs, 2 hosts)
Point-to-point links.
- Router-to-router WAN links
- ISP customer connections
- Metro Ethernet links
- Fixed endpoint VPN tunnels
/31 (2 IPs, 2 hosts)
Maximum efficiency for point-to-point (RFC 3021).
- Modern router interconnections
- Service provider infrastructure
- Data center network fabrics
- Any 2-IP requirement
/32 (1 IP)
Single-host routes.
- Loopback interfaces
- NAT pool addresses
- Specific service IPs
- Host routes in routing tables
VLSM Network Planning
Variable Length Subnet Masking allows efficient address allocation by using different subnet sizes for different network segments.
Step 1: List Requirements by Size
Example requirements:
- HQ LAN: 100 hosts
- Branch LAN: 50 hosts
- VoIP subnet: 20 phones
- Point-to-point links: 5 links (2 hosts each)
Step 2: Sort by Size (Largest First)
| Network | Hosts Needed | Next Power of 2 | CIDR |
|---|---|---|---|
| HQ LAN | 100 | 128 (27) | /25 |
| Branch LAN | 50 | 64 (26) | /26 |
| VoIP subnet | 20 | 32 (25) | /27 |
| P2P links (5) | 2 each | 4 (22) each | /30 each |
Step 3: Allocate Addresses Sequentially
Starting from 192.168.1.0/24:
| Network | Address Block | Usable Range |
|---|---|---|
| HQ LAN | 192.168.1.0/25 | 192.168.1.1 – 192.168.1.126 |
| Branch LAN | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 |
| VoIP subnet | 192.168.1.192/27 | 192.168.1.193 – 192.168.1.222 |
| P2P Link 1-5 | 192.168.1.224/30 onwards | 2 hosts each |
Documentation Best Practice
Maintain a detailed IP address plan document with:
- All subnet assignments with CIDR notation
- Purpose of each subnet
- Available blocks for future use
- VLAN and routing information
Subnet Troubleshooting Scenarios
“Can ping gateway, not other hosts”
Potential subnet issues:
- Incorrect subnet mask on host
- Host in different subnet than expected
- Gateway not routing properly
Check:
- Verify host subnet mask matches network
- Confirm IP is within expected range
- Check both hosts are in same subnet
“Networks can’t communicate after reconfiguration”
Potential subnet issues:
- Overlapping subnet ranges
- Incorrect masks causing boundary confusion
- Missing routes in router
Check:
- Use calculator to verify non-overlapping ranges
- Verify router interface subnet configuration
- Confirm routes exist in both directions
“New devices can’t get IP addresses”
Potential subnet issues:
- DHCP scope doesn’t match subnet
- Subnet out of available addresses
- DHCP using wrong subnet mask
Resolution:
If subnet has exhausted addresses, use VLSM to redesign the network or implement a larger subnet. Verify DHCP scope aligns with actual subnet configuration.
IPv6 Subnetting Fundamentals
IPv6 Address Structure
Organizations typically receive a /48 prefix, providing 65,536 /64 subnets (216), each with 264 addresses.
Common IPv6 Subnet Sizes
| Prefix | Typical Use | Available Subnets |
|---|---|---|
| /64 | Standard LAN/WiFi subnet | 1 subnet, 264 addresses |
| /56 | Small site (home, small office) | 256 /64 subnets |
| /48 | Typical organization | 65,536 /64 subnets |
| /127 | Point-to-point links | 2 addresses total |
IPv6 vs IPv4 Planning Differences
- No address conservation: IPv6 provides virtually unlimited addresses
- Standard /64 subnets: Almost all endpoints use /64 regardless of host count
- No NAT: Each device gets a public address, simplifying subnetting
- Hexadecimal notation: Addresses use 16-bit hex groups instead of decimal octets
- No broadcast: IPv6 uses multicast instead of broadcast addresses