Subnet Calculator
Calculate IPv4 CIDR prefixes, subnet masks, usable host address ranges, broadcast addresses, wildcard masks, and binary network bits.
Base routing destination
256 total addresses
Wildcard: 0.0.0.255
Private (RFC 1918 Class C)
How Subnetting & CIDR Calculation Works
An IPv4 address consists of 32 bits divided into four 8-bit octets. A subnet mask dictates which portion of the 32 bits identifies the network and which portion identifies individual host interfaces on that network.
Common Subnet Reference Table
| CIDR | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /24 | 255.255.255.0 | 256 | 254 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Network Engineering Use Cases
- ✓Cloud VPC Architecture (AWS, GCP, Azure)
Design non-overlapping CIDR blocks (/16, /20, /24) for public, private, and database subnets across multi-region VPC topologies.
- ✓Enterprise LAN & VLAN Segmentation
Carve up corporate Class A (10.0.0.0/8) or Class C (192.168.0.0/16) spaces into secure department VLANs (Engineering, Guest Wi-Fi, IoT).
- ✓Router & Firewall Access Control Lists (ACLs)
Determine exact wildcard masks (e.g. 0.0.0.255) needed for Cisco, Juniper, and pfSense firewall filter rules.
- ✓DevOps Kubernetes & Docker Pod Networking
Assign container pod IP pools and cluster service CIDRs without exhausting node addresses or colliding with host networks.
Why Use This Subnet Tool
Full CIDR Range Support (/0 to /32)
Calculate everything from the default internet route (/0) to individual host IP route endpoints (/32).
Automatic Class & RFC Detection
Instantly flags whether an IP is RFC 1918 Private, Loopback (127.0.0.1), Link-Local (169.254.x.x), or Public routable.
Binary Octet Visualization
Inspect 32-bit binary representations of both the IP and subnet mask to easily visualize network vs host bits.
One-Click Configuration Copy
Copy all network parameters in clean ASCII format directly to your clipboard for terminal scripts and documentation.
Frequently Asked Questions
What is an IPv4 Subnet and why is subnetting used?
Subnetting is the practice of dividing a larger physical IP network into smaller logical subnetworks (subnets). It improves network routing efficiency, enhances security by isolating segments, and reduces broadcast domain congestion.
What does CIDR notation (e.g. /24) mean?
Classless Inter-Domain Routing (CIDR) notation specifies how many contiguous leading bits of a 32-bit IPv4 address represent the network prefix. For example, /24 means the first 24 bits are the network address (255.255.255.0), leaving the remaining 8 bits for 256 total IP addresses (254 usable hosts).
Why are there 2 fewer usable hosts than total IP addresses?
In standard IPv4 subnets, the very first address in the block is reserved as the Network Identifier, and the very last address is reserved as the Broadcast Address for all hosts on the subnet. Therefore, usable hosts = 2^(32 - prefix) - 2.
What are the RFC 1918 private IP address ranges?
RFC 1918 reserves three address blocks for private internal networks: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255), 172.16.0.0/12 (172.16.0.0 – 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 – 192.168.255.255). These addresses cannot be routed across the public internet.
What is a wildcard mask?
A wildcard mask is the inverted binary complement of a subnet mask (calculated as 255.255.255.255 minus the subnet mask). For instance, a /24 subnet (255.255.255.0) has a wildcard mask of 0.0.0.255. It is used in Cisco IOS Access Control Lists (ACLs) and OSPF routing protocols.
More Networking Tools
Need a Brain Break? ☕
Done working on your task? Take a quick 60-second break, test your reflexes, and flap through infinite pixel obstacles in Sky Flap!