Subnet Calculator
Class C /24
Class A /8
Class B /16
Calculate subnet details from IP address and CIDR notation. Shows network address, broadcast address, host range, and number of usable hosts.
How to Use Subnet Calculator
- Enter an IP address (e.g., 192.168.1.0).
- Select or type the CIDR prefix length (0-32).
- The subnet details are calculated and displayed instantly.
- Click "Copy" next to any result to copy it to your clipboard.
How Subnet Calculation Works
Subnetting divides a larger network into smaller, more manageable sub-networks. The CIDR prefix length determines how many bits of the IP address are used for the network portion, and the remaining bits are used for host addresses. A /24 prefix means 24 bits for the network and 8 bits for hosts, allowing 256 total addresses (254 usable).
This tool performs all calculations using bitwise operations on the IP address octets entirely in your browser. It computes the subnet mask, network address, broadcast address, host range, and wildcard mask from the given IP and prefix length.
Common CIDR Sizes
A /24 gives you 256 addresses (254 usable) — the standard for a small office or home network. A /16 provides 65,536 addresses for larger organizations. A /28 carves out just 16 addresses (14 usable), common for small server clusters or point-to-point links. Cloud providers typically let you create VPCs with /16 and subdivide into /24 or smaller subnets per availability zone.
Private IP Ranges
Three ranges are reserved for private networks and won't be routed on the public internet: 10.0.0.0/8 (16.7 million addresses), 172.16.0.0/12 (1 million addresses, covering 172.16.x through 172.31.x), and 192.168.0.0/16 (65,536 addresses). Your home router almost certainly uses 192.168.x.x. AWS VPCs default to the 10.x.x.x range. Pick a range that won't conflict with other networks you might need to peer with.
Why Subnetting Matters for Cloud VPCs
In AWS, GCP, or Azure, your VPC's CIDR block determines how many resources you can deploy. Running out of IP addresses in a subnet means you can't launch new instances without restructuring. Plan for growth: a /16 VPC with /24 subnets gives you 256 subnets of 254 hosts each. Also note that cloud providers reserve a few addresses per subnet (typically 5 in AWS) for internal use, so your usable count is slightly lower than the math suggests.