Subnet Calculator
IPv4 & IPv6 CIDR Calculator
Type an address with a prefix or netmask. Instantly get the network and broadcast address, usable host range, subnet and wildcard masks, a color-coded binary view, the address type, and a subnet split planner for IPv4 and IPv6. 100% client-side. Zero data stored.
Subnet Calculator Tool
Accepts CIDR (10.0.0.0/8), an address and netmask (172.16.5.4 255.255.240.0), or IPv6 (2001:db8::/48). Results update as you type.
Examples
Subnet Details
IPv4Binary View
Network bits Host bits
Is This IP in the Subnet?
Enter an address to see whether it belongs to the network above.
Subnet Split Planner
Divide 192.168.1.0/24 into equal smaller subnets - by new prefix, by how many subnets you need, or by how many hosts each subnet must hold.
| # | Subnet | First Host | Last Host | Broadcast | Usable |
|---|
Common Use Cases
VLAN & LAN Planning
Carve an office or data center block into right-sized VLANs, and confirm each one has enough usable host addresses before you configure the switch.
Cloud VPC Design
Lay out AWS, Azure, or Google Cloud VPC subnets per availability zone without overlaps, using the split planner to produce the exact CIDR list.
Firewall Rules & ACLs
Get the wildcard mask Cisco ACLs and OSPF statements expect, and double-check that a firewall rule's CIDR covers exactly the hosts you intend.
Troubleshooting Connectivity
Check whether two hosts share a subnet or need a router between them - a mismatched netmask is one of the most common causes of "it pings one way only".
CCNA & Network+ Study
Practice subnetting by hand, then check your answers. The binary view shows exactly which bits belong to the network and which to the host.
IPv6 Address Planning
Split a /48 site allocation into /64 LANs, count the subnets you get, and generate reverse DNS (ip6.arpa) zone names on nibble boundaries.
IPv4 CIDR Reference Table
| Prefix | Subnet Mask | Wildcard Mask | Addresses | Usable Hosts |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
Usable hosts subtract the network and broadcast addresses, except /31 (two hosts on a point-to-point link, RFC 3021) and /32 (one host).
IPv4 Special-Purpose Ranges
| Range | Purpose | Defined In |
|---|---|---|
| 0.0.0.0/8 | This Network | RFC 791 |
| 10.0.0.0/8 | Private (RFC 1918) | RFC 1918 |
| 100.64.0.0/10 | Shared Address Space / CGNAT | RFC 6598 |
| 127.0.0.0/8 | Loopback | RFC 1122 |
| 169.254.0.0/16 | Link-Local | RFC 3927 |
| 172.16.0.0/12 | Private (RFC 1918) | RFC 1918 |
| 192.0.0.0/24 | IETF Protocol Assignments | RFC 6890 |
| 192.0.2.0/24 | Documentation (TEST-NET-1) | RFC 5737 |
| 192.31.196.0/24 | AS112-v4 | RFC 7535 |
| 192.52.193.0/24 | AMT | RFC 7450 |
| 192.88.99.0/24 | Deprecated 6to4 Relay Anycast | RFC 7526 |
| 192.168.0.0/16 | Private (RFC 1918) | RFC 1918 |
| 192.175.48.0/24 | Direct Delegation AS112 Service | RFC 7534 |
| 198.18.0.0/15 | Benchmarking | RFC 2544 |
| 198.51.100.0/24 | Documentation (TEST-NET-2) | RFC 5737 |
| 203.0.113.0/24 | Documentation (TEST-NET-3) | RFC 5737 |
| 224.0.0.0/4 | Multicast | RFC 5771 |
| 240.0.0.0/4 | Reserved (Future Use) | RFC 1112 |
| 255.255.255.255/32 | Limited Broadcast | RFC 919 |
IPv6 Special-Purpose Ranges
| Range | Purpose | Defined In |
|---|---|---|
| ::/128 | Unspecified | RFC 4291 |
| ::1/128 | Loopback | RFC 4291 |
| ::ffff:0:0/96 | IPv4-Mapped | RFC 4291 |
| 64:ff9b::/96 | IPv4/IPv6 Translation (NAT64) | RFC 6052 |
| 64:ff9b:1::/48 | Local-Use IPv4/IPv6 Translation | RFC 8215 |
| 100::/64 | Discard-Only | RFC 6666 |
| 2001::/23 | IETF Protocol Assignments | RFC 2928 |
| 2001::/32 | Teredo | RFC 4380 |
| 2001:2::/48 | Benchmarking | RFC 5180 |
| 2001:20::/28 | ORCHIDv2 | RFC 7343 |
| 2001:db8::/32 | Documentation | RFC 3849 |
| 2002::/16 | 6to4 | RFC 3056 |
| 3fff::/20 | Documentation | RFC 9637 |
| 5f00::/16 | Segment Routing (SRv6) SIDs | RFC 9602 |
| fc00::/7 | Unique Local (ULA) | RFC 4193 |
| fe80::/10 | Link-Local | RFC 4291 |
| ff00::/8 | Multicast | RFC 4291 |
Common IPv6 Prefix Sizes
- /32 - typical ISP or RIR allocation
- /48 - one site or organization (65,536 /64 LANs)
- /56 - typical home or small-business delegation (256 /64 LANs)
- /64 - one LAN segment, required for SLAAC
- /127 - point-to-point router link (RFC 6164)
- /128 - a single host or loopback
Ranges follow the IANA IPv4 and IPv6 Special-Purpose Address Registries. The IP Address Generator uses the same list, so both tools label every address the same way.
Pro Tip: URL Parameters
Link straight to a calculation with /subnet-calculator/?ip=10.0.0.0/22. Add &split=24 to open the split planner at /24, or &count=all to count every address as usable.
The address bar updates as you type, and "Copy Share Link" copies it - handy for tickets, runbooks, and change requests.
Frequently Asked Questions
Why We Built This Subnet Calculator
Subnetting is simple arithmetic that is easy to get wrong under pressure. One wrong bit in a netmask produces overlapping VPC subnets, a firewall rule that covers twice as many hosts as intended, or two servers that can no longer reach each other. We built this subnet calculator to answer the everyday questions - which network is this address in, how many hosts fit, what is the wildcard mask - instantly and without ambiguity.
It is strict where strictness prevents mistakes. It refuses ambiguous input like leading-zero octets, explains non-contiguous and wildcard masks instead of guessing, follows RFC 3021 for /31 links, and calculates IPv6 with full 128-bit precision. Address types come from the IANA special-purpose registries, so a carrier-grade NAT address is labeled as shared address space rather than "public". The split planner turns a block into a ready-to-paste CSV of subnets, and every result can be copied, downloaded, or shared as a link. All of it runs locally in your browser.
The Subnet Calculator is part of RJL.io's collection of free developer tools. Generate test addresses with the IP Address Generator, look up response codes in the HTTP Status Codes reference, and work out uptime targets with the SLA Calculator.