Subnet Calculator
Free subnet calculator: calculate subnet masks, IP address ranges, broadcast addresses, and available hosts for any CIDR
Calculator
Your Results
Enter your values and click Calculate to see results
How the Subnet Calculator Works
The subnet calculator takes an IP address in CIDR notation (e.g., 192.168.1.0/24) and returns the network address, broadcast address, usable host range, subnet mask, and total host count. With 60,500 monthly searches, this is one of the most-used networking tools for IT professionals, network engineers, and CCNA students.
CIDR notation specifies how many bits of the 32-bit IPv4 address represent the network portion. /24 = 24 network bits, 8 host bits = 256 total addresses (254 usable hosts). /16 = 16 network bits, 16 host bits = 65,536 total addresses. The slash number directly controls subnet size.
IP Subnet Calculator: Common CIDR Blocks Explained
- /32: Single host. Subnet mask 255.255.255.255. Used for host routes.
- /30: 4 addresses, 2 usable. Perfect for point-to-point WAN links.
- /29: 8 addresses, 6 usable. Small office or branch subnet.
- /28: 16 addresses, 14 usable. Small team or department.
- /27: 32 addresses, 30 usable.
- /24: 256 addresses, 254 usable. Standard "class C" — most common enterprise subnet size.
- /16: 65,536 addresses. Classic "class B" network.
- /8: 16,777,216 addresses. Classic "class A" — reserved for ISPs and large organizations.
Subnet Mask Calculator: Converting CIDR to Dotted Decimal
The subnet mask is a 32-bit number with 1s in the network bits and 0s in the host bits. /24 = 255.255.255.0. /26 = 255.255.255.192. /28 = 255.255.255.240. To calculate host count: 2^(host bits) − 2 (subtract network and broadcast). /26 has 6 host bits: 2^6 − 2 = 62 usable hosts.
Network Subnet Calculator: Private IP Ranges
- 10.0.0.0/8: 10.0.0.0 – 10.255.255.255 (Class A private; 16.7M addresses)
- 172.16.0.0/12: 172.16.0.0 – 172.31.255.255 (Class B private; 1.05M addresses)
- 192.168.0.0/16: 192.168.0.0 – 192.168.255.255 (Class C private; 65,536 addresses)
- 127.0.0.0/8: Loopback (localhost) — never routed
- 169.254.0.0/16: Link-local (APIPA) — assigned automatically when DHCP fails
Frequently Asked Questions
What is subnetting and why is it used?
Subnetting divides a large IP network into smaller, manageable segments. Benefits: improved security (isolating departments), reduced broadcast traffic, better IP address utilization, and logical organization mirroring physical structure. A /16 network could host 65,534 devices on one flat segment — impractical. Subnet into /24 blocks: 256 subnets of 254 hosts each, far easier to manage.
How do I find the network address from an IP and subnet mask?
Perform a bitwise AND between the IP address and subnet mask. Example: IP 192.168.1.100, mask 255.255.255.0. Result: 192.168.1.0 (the network address). The broadcast is the last address (network address with all host bits set to 1 = 192.168.1.255). Between them are the 254 usable host addresses.
Subnet Calculator: Practical Subnetting Examples
Example 1 — Design a network for a 3-floor office building with 50 devices per floor: Using 192.168.0.0/24 as your base network, you need 3 subnets of at least 50 hosts. A /26 provides 62 usable hosts — sufficient. Allocate: Floor 1: 192.168.0.0/26 (hosts 192.168.0.1–0.62). Floor 2: 192.168.0.64/26 (hosts 192.168.0.65–0.126). Floor 3: 192.168.0.128/26 (hosts 192.168.0.129–0.190). Remaining: 192.168.0.192/26 for management/servers.
Example 2 — Calculating subnets for VLSM (Variable Length Subnet Masking): If one department needs 100 hosts, another 50, and another 10, use different prefix lengths: /25 (126 usable) for the 100-host requirement, /26 (62 usable) for 50-host, /28 (14 usable) for 10-host. VLSM avoids wasting address space compared to using the same size subnet everywhere.
IPv6 note: IPv6 uses 128-bit addresses, making IPv4 subnetting concepts mostly obsolete for future network designs. However, IPv4 subnetting remains essential for managing existing networks, private networks (RFC 1918), VPNs, and cloud VPCs. AWS VPC, Azure VNet, and Google Cloud VPC all use IPv4 CIDR notation for subnetting — understanding /24 vs. /16 vs. /28 is required knowledge for any cloud architect.
Subnet Calculator: Cloud Networking and CIDR in AWS, Azure, and Google Cloud
Cloud virtual private clouds (VPCs) use the same IPv4 CIDR notation as traditional networking. AWS VPC sizing guidelines: the maximum VPC size is /16 (65,536 addresses). Subnets within a VPC can range from /28 (16 addresses) to /16. Each subnet is associated with a single Availability Zone. AWS reserves 5 IP addresses per subnet (network address, VPC router, DNS server, future use, broadcast) — so a /28 has only 11 usable host addresses rather than 14.
Planning VPC CIDR ranges requires thinking ahead. A /24 VPC with /27 subnets gives you 8 subnets of 30 usable hosts each. If you later need to add 200 hosts in a new subnet, you'll run out of space. Many AWS architects recommend starting with a /16 VPC even for small deployments — the address space is free, and running out of IP space in production is extremely disruptive to remediate.
RFC 1918 private ranges in cloud: 10.0.0.0/8 is most popular for cloud VPCs due to its large size. 172.16.0.0/12 is sometimes used for secondary VPCs or hub-spoke architectures. 192.168.0.0/16 is often avoided in cloud environments because it conflicts with many home and small office router defaults, causing connectivity issues for VPN users working from home.