IP Subnet Calculator
Calculate IPv4 CIDR subnets (/0 to /32). Computes network address, broadcast address, first and last usable host IPs, wildcard mask, and binary subnet masks.
Did this calculation save you time?
Student ProjectHi! I'm a student developer building Calculat in my spare time. I was tired of searching for basic math tools and having to click through 10 spammy popups, loan ads, and cookie trackers.
I keep this website 100% free, private, and ad-free. If this helped you with your homework, project, or finances today, bookmarking this page or telling a friend helps me keep building more free tools!
What Is a IP Subnet Calculator?
The IP Subnet Calculator performs IPv4 subnetting calculations based on Classless Inter-Domain Routing (CIDR). It calculates the network ID, broadcast address, usable host IP range, wildcard mask, and total usable host capacity for network engineers and system administrators.
How to Use This Calculator
- Enter an IPv4 address (e.g., 192.168.1.100 or 10.0.0.1).
- Select the CIDR prefix length (e.g., /24 for 255.255.255.0 or /16 for 255.255.0.0).
- Review the network address, broadcast address, first/last usable IP addresses, wildcard mask, and binary representation.
Usable Hosts & Network Bitwise Logic
N_{\text{hosts}} = 2^{32 - \text{prefix}} - 2, \quad \text{Network} = \text{IP} \ \& \ \text{Mask}, \quad \text{Broadcast} = \text{Network} \ | \ \sim\text{Mask}In standard subnets (prefix ≤ 30), two addresses are reserved: all 0s for the network ID and all 1s for the broadcast address.
Worked Example
Scenario: Subnetting 192.168.1.100 with a /24 CIDR prefix (255.255.255.0)
CIDR prefix: /24 (32 - 24 = 8 host bits).
Total IP addresses: 2⁸ = 256.
Usable hosts: 256 - 2 = 254 hosts.
Network address: 192.168.1.0; Broadcast: 192.168.1.255.
Usable host range: 192.168.1.1 through 192.168.1.254.
Tips & Key Notes
- /24 subnets (254 usable hosts) are the universal standard for home and office LAN segments.
- For point-to-point router links, /30 (2 hosts) or /31 (2 hosts under RFC 3021) saves valuable IPv4 address space.
- Wildcard masks are calculated by inverting the subnet mask (255.255.255.255 - Mask) and are used extensively in Cisco ACLs and OSPF.
Frequently Asked Questions
What is CIDR notation?
Classless Inter-Domain Routing (CIDR) represents an IP address and its associated subnet mask using a slash followed by the count of leading 1s in the mask (e.g., /24 means 24 mask bits or 255.255.255.0).
Why are 2 addresses subtracted from the host capacity?
The first address (where all host bits are 0) identifies the network itself. The last address (where all host bits are 1) is reserved as the local broadcast address.
What are RFC 1918 Private IP ranges?
Private IP addresses reserved for home and enterprise local networks: Class A: 10.0.0.0/8; Class B: 172.16.0.0/12; Class C: 192.168.0.0/16.
What is a /31 subnet used for?
Under RFC 3021, /31 subnets (with only 2 addresses total) are used for point-to-point router links without reserving network or broadcast addresses, conserving IPv4 space.
Related Calculators
Explore similar toolsDownload Time Calculator
Calculate how long files, games, or videos will take to download based on file size and internet connection speed.
Epoch Time Converter
Convert Unix epoch timestamps in seconds and milliseconds to UTC and local human-readable date-time formats.
XRP Profit Calculator
Calculate cryptocurrency trading profit, loss, return on investment (ROI), and exchange transaction fees for Ripple (XRP).