Subnet Calculator

Calculate network details from an IP address and CIDR prefix.

/
Network Address
-
Broadcast Address
-
First Host
-
Last Host
-
Subnet Mask
-
Wildcard Mask
-
Total Hosts
-
Usable Hosts
-

What is IP Subnetting?

IP subnetting is the process of dividing a large IP network into smaller, logical sub-networks. Every IPv4 address is a 32-bit number, split into a network portion and a host portion. The subnet mask (or CIDR prefix) determines where that split happens. Subnetting lets network administrators control traffic flow, improve security through isolation, and use IP address space more efficiently.

CIDR (Classless Inter-Domain Routing) notation uses a slash followed by a number to indicate the subnet mask. For example, 192.168.1.0/24 means the first 24 bits are the network address, leaving 8 bits for host addresses (256 total, 254 usable). The smaller the CIDR number, the larger the network.

How to Use This Tool

  1. 1. Enter an IP address - Type any IPv4 address (e.g., 192.168.1.0)
  2. 2. Select a CIDR prefix - Choose the subnet size from /8 to /32
  3. 3. Click Calculate - See the network address, broadcast, host range, masks, and host count

CIDR Quick Reference

CIDR Subnet Mask Usable Hosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/20255.255.240.04,094
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

Common Use Cases

Frequently Asked Questions

What is the difference between a subnet mask and a wildcard mask?
A subnet mask and wildcard mask are inverses of each other. The subnet mask has 1s for the network portion and 0s for the host portion (e.g., 255.255.255.0). The wildcard mask has 0s for the network portion and 1s for the host portion (e.g., 0.0.0.255). Wildcard masks are used in Cisco ACLs and OSPF configurations, while subnet masks are used everywhere else. To convert between them, subtract the subnet mask from 255.255.255.255.
Why does a /24 subnet only have 254 usable hosts instead of 256?
A /24 subnet has 256 total addresses (28), but two are reserved: the first address is the network address (identifies the subnet itself) and the last address is the broadcast address (used to send packets to all hosts). Neither can be assigned to a device, so 256 - 2 = 254 usable host addresses. The exception is /31 (point-to-point links) and /32 (single host), which have special rules.
What are the private IP address ranges?
RFC 1918 defines three private IP ranges that are not routable on the public internet: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255, ~16.7 million addresses), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255, ~1 million addresses), and 192.168.0.0/16 (192.168.0.0 - 192.168.255.255, ~65,000 addresses). Most home routers use 192.168.x.x, while cloud providers and enterprises typically use 10.x.x.x.
How do I choose subnet sizes for AWS VPCs?
AWS recommends a VPC CIDR between /16 and /28. A common pattern is /16 for the VPC (65,534 IPs) with /24 subnets for each availability zone. For example: public subnet /24 in each AZ for load balancers, private subnet /24 for application servers, and a separate /24 for databases. Remember that AWS reserves 5 IPs per subnet (first 4 + last 1), so a /24 gives 251 usable IPs in AWS.

Related Tools

Monitor your network infrastructure

Once your subnets are configured, make sure your services stay reachable. UptimeSignal monitors your endpoints from outside your network and alerts you the moment something goes down.

Start monitoring free →

25 monitors free. No credit card required.