Subnet Calculator
Calculate network address, broadcast address, usable host range, and more from an IP address and CIDR notation or subnet mask. Essential for network engineers and IT professionals.
How to Use This Calculator
- Enter an IP address (e.g., 192.168.1.0).
- Enter a CIDR prefix length (e.g., 24) or a subnet mask (e.g., 255.255.255.0).
- Optionally, use the Common Masks dropdown for quick selection.
- Click "Calculate" to see the network details, host range, and binary representation.
Formula
The network address is obtained by ANDing the IP with the subnet mask. The broadcast address is obtained by ORing the IP with the wildcard mask (inverse of the subnet mask).
Examples
192.168.1.0/24 → Network: 192.168.1.0, Broadcast: 192.168.1.255, Usable Hosts: 192.168.1.1 – 192.168.1.254 (254 hosts)
172.16.0.0/16 → Usable Hosts: 172.16.0.1 – 172.16.255.254 (65,534 hosts). Wildcard Mask: 0.0.255.255
10.0.0.1/30 → Only 2 usable hosts (10.0.0.1 and 10.0.0.2). Ideal for point-to-point router links.
Frequently Asked Questions
What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting allows network administrators to divide a large network into smaller, more manageable segments, improving performance and security.
What does /24 mean?
/24 is CIDR notation meaning the first 24 bits of the subnet mask are set to 1, which equals 255.255.255.0. It leaves 8 bits for host addresses, providing 254 usable IPs.
How many hosts are in a /24 network?
A /24 network has 2⁻ = 256 total addresses. Subtract 2 (network address and broadcast address) to get 254 usable host addresses.
What is the difference between public and private IP addresses?
Private IP addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the public internet and are used within local networks. Public IPs are globally unique and assigned by ISPs.
What is CIDR?
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing. It replaces classful addressing with variable-length subnet masks, allowing more efficient use of the IP address space.