🌐 CIDR / Subnet Calculator
Calculate network address, broadcast, host count, first/last host from CIDR notation instantly. Supports both IPv4 and IPv6.
🔗 Related Tools
📖 Where people get stuck
Compute the network address, broadcast address, usable host count and address range from CIDR notation. Everything runs in the browser. Getting the arithmetic right is a different question from whether the design is right: you size a subnet for where the network will end up, not for the machines on it today, because widening it later means reconfiguring every device on it.
| Case | What happens | What to do |
|---|---|---|
| The host count is two short | A /24 contains 256 addresses but only 254 are usable: the first is the network address and the last is the broadcast address. A /30 gives two usable out of four, which is exactly a router-to-router link. A /31 nominally has zero hosts, but RFC 3021 permits using both addresses on a point-to-point link. |
Planning for a hundred servers, look at a /23 (510 hosts) rather than a /24 (254). Conserving addresses matters for global IPv4, but there is almost no reason to economise inside private space — 10.0.0.0/8 holds sixteen million. Cutting it fine and then being unable to extend into the adjacent range, so the routing table grows instead, costs more than the addresses ever would. |
| Getting the subnet boundary wrong | Writing 192.168.1.100/24 still describes the network 192.168.1.0/24. Bits set in the host portion make no difference; /24 only ever means the top 24 bits are the network. With a mask that is not a multiple of eight, intuition stops working — few people can say immediately that 192.168.1.100/26 sits in 192.168.1.64. |
Always compute it before writing it into a configuration. Firewall ranges and ACLs are the sharp case: one boundary off and you either admit a host you did not mean to, or drop one you did — and only the second kind gets noticed. Remember that each extra mask bit halves the block: /25 is 128 (0–127, 128–255), /26 is 64, /27 is 32. |
| Sizing IPv6 with IPv4 habits | In IPv6 a /64 is the standard unit for one network, and subnetting below it breaks SLAAC address autoconfiguration. A single /64 holds eighteen quintillion addresses, but treating that as waste and carving out a /120 is a design error, not a saving. Carrying IPv4 instincts across produces faults that are hard to attribute later. |
The standard approach is a /48 per site, subnetted into /64s — a /48 holds 65,536 of them. Point-to-point links are the exception, where RFC 6164 recommends a /127. Treat IPv6 space as something to allocate legibly rather than something to conserve: encoding the site and the purpose into the digits gives you a plan that still makes sense years later. |
The only ranges you may use as private addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). Note that the 172 range is a /12, so it runs from 172.16 to 172.31 and does not include 172.32 — an easy one to get wrong. When designing a VPC or a container network, choose generously and choose something others are unlikely to have picked, so a future VPC peering or VPN does not collide. 192.168.0.0/24 and 192.168.1.0/24 are the defaults on home routers and will collide on a site-to-site VPN sooner or later.
📖 How to Use
-
1
Enter CIDR notationEnter CIDR notation like 192.168.1.0/24. IPv6 notation such as 2001:db8::/32 is also supported.
-
2
Review the resultsNetwork address, broadcast, netmask, wildcard, first/last host, and total host count are displayed instantly.
-
3
Select a sampleClick any sample button below the input to load a common CIDR range instantly.
❓ Frequently Asked Questions
What is the difference between /24 and /25?
Does it support IPv6?
How do I find the prefix length from a subnet mask?
🐛 Found a bug or issue with this tool?
Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.
Thanks for your report!
Your report has been delivered to the operator and will be used to improve the tool.