Subnet Calculator: Calculate IP Subnets & CIDR | Free Tool
432 usesSubnet Calculator Tips
Complete Subnet Info
Calculate network address, subnet mask, wildcard, broadcast, first/last usable IP, and host count.
All CIDR Prefixes
Choose any CIDR prefix from /1 to /32 with host count shown for each.
IP Class Detection
Automatically detects IP class (A/B/C/D/E) and whether the address is public or private.
Binary View
See the IP address in binary notation for educational purposes.
Frequently Asked Questions
Does a /24 subnet always give you 254 usable IPs?
Not exactly — it depends on whether the network uses RFC 3021 or not. Standard subnets reserve the network ID and broadcast address, so a /24 gives 254 usable IPs out of 256 total. But for point-to-point links, RFC 3021 allows using a /31 with zero waste, giving you 2 usable addresses. Most home and office networks stick with the /24 standard. Always check the 'Usable IP Range' in our calculator before deploying.
Can I use 192.168.1.0/24 and 192.168.2.0/24 on the same router?
Yes, those are completely different subnets. A router can handle multiple subnets as long as each interface or VLAN has its own unique network address. What you cannot do is overlap them — like using 192.168.1.0/24 and 192.168.1.0/25 on the same router. That would create routing confusion. Our calculator helps you visualize exactly where one subnet ends and another begins. Typing both ranges in quickly shows they don't share any IPs.
Does changing the CIDR prefix affect the subnet mask shown?
Yes, every time you adjust the /prefix, the subnet mask updates instantly. A /24 gives 255.255.255.0, but a /25 shifts that to 255.255.255.128. The tool recalculates the network address, broadcast, and usable range on the fly. Try dragging the slider from /24 to /28 and watch the usable hosts drop from 254 to 14. That's a quick way to see how subnet boundaries tighten.
Why does the calculator show a different network address than my router does?
This usually happens when you mistype the IP or CIDR prefix. For 192.168.1.0/24, the network address is 192.168.1.0. But if you enter 192.168.1.15/24, the calculator shifts the boundary and shows 192.168.1.0 as the network ID — your router might assume a different subnet. Double-check the slash number first. A mismatch means one of them is set wrong.
What happens if I use a /31 subnet on a point-to-point link?
A /31 gives you exactly 2 IPs, and RFC 3021 lets you use both of them. No network or broadcast address gets wasted, so the usable range equals the full subnet. For example, 10.0.0.0/31 gives you 10.0.0.0 and 10.0.0.1 as usable. Most modern routers support this, but some older hardware might not. Before you configure it, check your router's documentation. If you're unsure, stick with /30, which gives you 2 usable hosts out of 4 IPs.
Why does the calculator show an IP as both in-range and out-of-range?
You're likely looking at a host IP that falls exactly on a subnet boundary. Say you enter 192.168.1.255/24 — the tool flags it as the broadcast, so it's not usable. But if you bump the prefix to /23, that same address becomes a regular host in the 192.168.0.0/23 range. The classification depends entirely on where the mask cuts. Check the 'Network Address' field to confirm which boundary the tool applied.
Is the subnet mask 255.255.255.192 always a /26?
Yes, that pairing is fixed. The mask defines the prefix length, so 255.255.255.192 always equals /26. What varies is the network boundary — for 192.168.1.0/26, you get 62 usable hosts, but for 192.168.1.64/26, that same mask starts at a different network address. People often assume the IP determines the slash value, but the IP just picks a point inside the block. Enter your IP and let the tool show which /26 segment it actually lands in. That saves you from misconfiguring a DHCP scope.
Can I export these subnet calculation results into a script or API?
Our free web tool doesn't offer a direct REST API for programmatic queries. But you can easily copy the text output or use browser developer tools to grab the generated table data. If you're writing automation scripts in Python, libraries like ipaddress handle these calculations locally without needing an external web interface. Grab your CIDR block and paste the results right into your config files.
Will overlapping subnets crash my local network immediately?
They won't crash your switch right away, but you'll see erratic routing behavior. Devices on a /24 network will constantly drop packets when traffic gets sent to the wrong gateway. Junior devs often mix up overlapping scopes during cloud VPC setups. Paste both CIDR blocks into our calculator to spot those conflicts before deployment.
Convert public cloud IP ranges to local netmasks easily?
Cloud providers often output firewall rules in CIDR notation rather than traditional dotted-decimal masks. Paste a block like 34.200.0.0/16 into our calculator to instantly reveal the 255.255.0.0 subnet mask. AWS and Azure documentation relies heavily on slash notation for security groups. Backend developers frequently use this conversion when translating cloud configurations into legacy on-premise firewall formats.
How to Calculate Subnets
- Enter an IP address
- Select the CIDR prefix
- View the complete subnet information
- Check usable IP range and host count