IPv4 Subnet Calculator
Enter an IP address and either a CIDR prefix or subnet mask to calculate network details.
Tip: You can press Enter in any field to run the calculator.
What an IP address subnet calculator does
An IP address subnet calculator takes a host IP and subnet definition (CIDR notation like /24 or a subnet mask like 255.255.255.0) and computes the key network values you need for planning and troubleshooting. Instead of doing binary math by hand, you instantly get your network address, broadcast address, usable host range, and host counts.
This is especially useful for network engineers, sysadmins, students preparing for CCNA/Network+ exams, and anyone configuring routers, firewalls, VLANs, or cloud VPC subnets.
Key subnetting terms you should know
IP address
An IPv4 address is a 32-bit number shown in dotted decimal format, such as 10.0.3.15. A subnet divides this larger address space into smaller networks.
CIDR prefix
CIDR (Classless Inter-Domain Routing) uses a slash suffix like /26. The number after the slash tells you how many bits are used for the network portion.
Subnet mask
A subnet mask is another way to express the prefix length. For example:
- /24 = 255.255.255.0
- /25 = 255.255.255.128
- /26 = 255.255.255.192
Network and broadcast addresses
The network address identifies the subnet itself, and the broadcast address is used to reach all hosts in that subnet (except in special cases such as /31 point-to-point links). Usable hosts typically lie between these two addresses.
How subnet calculations work (quick logic)
Subnetting is essentially bitwise math:
- Network address = IP AND subnet mask
- Broadcast address = Network OR wildcard mask
- Wildcard mask = inverse of subnet mask
- Total addresses = 2^(host bits)
For most subnets, usable hosts are calculated as total addresses minus 2 (one network address + one broadcast address). For /31 and /32, host behavior is special and represented accordingly in the calculator output.
Example subnetting scenarios
Example 1: 192.168.1.42/24
- Network: 192.168.1.0
- Broadcast: 192.168.1.255
- Usable range: 192.168.1.1 - 192.168.1.254
- Usable hosts: 254
Example 2: 10.20.30.77/27
- Subnet mask: 255.255.255.224
- Block size: 32 addresses
- Network: 10.20.30.64
- Broadcast: 10.20.30.95
- Usable hosts: 30
Why subnet calculators matter in real environments
In production networks, bad subnet math creates outages fast. A wrong gateway, overlapping subnet, or incorrect route mask can break connectivity in seconds. A calculator helps you verify results before touching live systems.
- Designing VLAN segments for departments
- Creating cloud subnets in AWS, Azure, or GCP
- Planning DHCP pools and static ranges
- Troubleshooting route advertisements and ACLs
- Avoiding overlapping private IP ranges during VPN setup
Common subnetting mistakes to avoid
- Confusing /24 with 255.255.0.0 (it should be 255.255.255.0)
- Assigning the network or broadcast address to end devices
- Mixing CIDR and mask values that don’t match
- Forgetting /31 and /32 are special-use edge cases
- Not checking if an address belongs to RFC1918 private ranges
Private IPv4 ranges quick reference
- 10.0.0.0 - 10.255.255.255 (10/8)
- 172.16.0.0 - 172.31.255.255 (172.16/12)
- 192.168.0.0 - 192.168.255.255 (192.168/16)
The calculator also tells you whether your entered address is in a private range, which is useful when separating internal and internet-routable addressing plans.
Final thoughts
A dependable subnet calculator saves time and reduces errors. Use it as a daily utility for network planning, documentation, exam prep, and troubleshooting. If you work with IPv4 regularly, this should be one of your go-to tools.