IP Subnet Calculator — IPv4 CIDR
Calculate network, broadcast, host range, and usable hosts from IP and CIDR. Essential for network design and troubleshooting.
Why This Technology Metric Matters
Why: Subnetting is fundamental to IP network design. Knowing network, broadcast, and host range prevents misconfigurations.
How: IP and CIDR are parsed. Subnet mask = 32-CIDR zero bits. Network = IP AND mask. Broadcast = network OR wildcard.
- ●Usable hosts = 2^(32-CIDR) - 2
- ●/24 is the most common LAN size
- ●/30 is standard for point-to-point
📋 Quick Examples — Click to Load
⚠️For educational and informational purposes only. Verify with a qualified professional.
🔧 Tech Milestones
CIDR introduced in 1993
— RFC 4632
/24 gives 254 usable hosts for typical LAN
— IANA
/30 gives 2 hosts for point-to-point links
— RFC
IPv4 subnetting divides address space using CIDR. Network = IP AND mask. Broadcast = network OR wildcard. Usable hosts = 2^(32-CIDR) - 2. /24 gives 254 hosts; /30 gives 2 for point-to-point.
Sources: RFC 4632, Wikipedia CIDR, IANA.
Key Takeaways
- • CIDR /24 = 256 addresses, 254 usable hosts (minus network and broadcast)
- • Network address is the first IP; broadcast is the last
- • Wildcard mask is the inverse of the subnet mask
- • /30 is common for point-to-point links (2 usable hosts)
Did You Know?
How Does Subnetting Work?
Network Address
IP AND subnet mask. First address in the range.
Broadcast
Network OR wildcard. Last address; used to reach all hosts.
Host Count
2^(32-CIDR) - 2. Subtract network and broadcast.
Expert Tips
CIDR Comparison Table
| CIDR | Hosts | Use Case |
|---|---|---|
| /30 | 2 | Point-to-point |
| /28 | 14 | Small subnet |
| /24 | 254 | Typical LAN |
| /16 | 65,534 | Large network |
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) uses a slash and number, e.g. /24, to indicate how many bits are the network portion. /24 means 24 bits for network, 8 for hosts.
Why subtract 2 from host count?
The network address and broadcast address cannot be assigned to hosts. So 2^8 - 2 = 254 usable hosts for /24.
What is a wildcard mask?
The wildcard mask is the bitwise inverse of the subnet mask. Used in ACLs and OSPF. For /24, wildcard is 0.0.0.255.
What is the difference between network and broadcast?
Network address identifies the subnet; broadcast is used to send to all hosts in the subnet. Neither can be assigned to a host.
What is a /30 used for?
Point-to-point links between routers. Only 2 usable hosts (the two router interfaces).
How do I subnet a /24?
Use /25, /26, etc. for smaller subnets. /25 = 128 addresses, 126 usable.
Key Statistics
Official Data Sources
⚠️ Disclaimer: This calculator is for educational purposes only. IPv4 only. For IPv6 use different tools. Verify results for production networks. Not professional networking advice.