Free Subnet Calculator (CIDR)
Enter an IP address and CIDR prefix length to instantly calculate the network address, broadcast address, usable host range, subnet mask, wildcard mask, and total number of hosts. Essential for network planning, firewall rules, and understanding how IP subnetting works.
Subnet Calculator
Results
Visual Subnet Map
Common Subnet Reference
| CIDR | Subnet Mask | Addresses | Usable |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 |
| /31 | 255.255.255.254 | 2 | 2 (P2P) |
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /23 | 255.255.254.0 | 512 | 510 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /0 | 0.0.0.0 | 4,294,967,296 | 4,294,967,294 |
How to Use This Tool
- Enter an IP address – any valid IPv4 address in dotted-decimal notation (e.g.,
192.168.1.0or10.0.0.50). This can be a network address or any host address within the subnet you want to calculate. - Select a prefix length – choose a CIDR prefix from /1 to /32 using the dropdown or slider. The most common values are /24 (256 addresses, typical home or small office network), /16 (65,536 addresses), and /8 (16.7 million addresses). The tool defaults to /24.
- View the calculated results. All values update instantly as you change the inputs – no need to click a button.
Understanding Your Results
| Field | What It Means |
|---|---|
| Network Address | The first address in the subnet – identifies the network itself. This address is not assignable to a device. For 192.168.1.0/24, the network address is 192.168.1.0. |
| Broadcast Address | The last address in the subnet – used to send traffic to all hosts on the network simultaneously. Also not assignable to a device. For 192.168.1.0/24, this is 192.168.1.255. |
| First Usable Host | The first IP address you can assign to a device (network address + 1). |
| Last Usable Host | The last IP address you can assign to a device (broadcast address – 1). |
| Total Hosts | The total number of addresses in the subnet, calculated as 2^(32 – prefix). A /24 has 256 total addresses. |
| Usable Hosts | Total hosts minus 2 (the network and broadcast addresses). A /24 has 254 usable host addresses. A /31 is a special case with 2 usable hosts (point-to-point links). A /32 represents a single host. |
| Subnet Mask | The traditional dotted-decimal representation of the prefix length. A /24 equals 255.255.255.0. This is what you enter in network device configuration interfaces. |
| Wildcard Mask | The inverse of the subnet mask – used in Cisco ACLs and some firewall configurations. For /24, the wildcard mask is 0.0.0.255. |
Why This Matters
Subnetting is how networks are divided into smaller, manageable segments. Every network engineer, system administrator, and IT professional deals with subnetting regularly – whether designing a new office network, writing firewall rules, configuring VPN tunnels, or troubleshooting connectivity problems.
Getting the math wrong has real consequences. Assign an IP outside the subnet range and the device can’t communicate. Miscalculate the wildcard mask in a firewall rule and you either block legitimate traffic or allow traffic you meant to block. Use an incorrect network address in a routing table and packets go nowhere.
Common use cases:
- Network planning. Determine how many usable addresses a subnet provides before allocating it to a department or VLAN. A /24 gives you 254 hosts – enough for a small office. Need 500 devices? You’ll need a /23 (510 usable hosts).
- Firewall rules. Calculate the correct network address and wildcard mask to permit or deny traffic for a specific subnet.
- VPN configuration. When configuring split tunneling or site-to-site VPNs, you need the exact network address and prefix for each subnet that should route through the tunnel.
- Cloud infrastructure. AWS VPCs, Azure VNets, and Google Cloud VPCs all require CIDR notation when defining subnets. Overlapping subnets cause routing conflicts that are painful to debug.
Frequently Asked Questions
What CIDR prefix should I use for my home network?
Most home routers default to /24 (255.255.255.0), which provides 254 usable addresses. This is more than enough for a typical household with phones, laptops, smart TVs, and IoT devices. You’d only need a larger subnet if you had more than 254 devices on a single network segment, which is uncommon outside of enterprise environments.
What’s the difference between a subnet mask and a wildcard mask?
They’re inverses of each other. A subnet mask uses 1-bits to mark the network portion and 0-bits for the host portion (e.g., 255.255.255.0). A wildcard mask flips this – 0-bits for the network portion and 1-bits for the host portion (e.g., 0.0.0.255). Subnet masks are used in most operating systems and network devices. Wildcard masks are primarily used in Cisco IOS access control lists (ACLs) and OSPF configurations.
What is a /31 subnet used for?
A /31 subnet contains exactly 2 addresses with no network or broadcast address (per RFC 3021). It’s used for point-to-point links between two routers where you don’t need a broadcast address. This saves one IP address compared to using a /30, which matters when you have hundreds or thousands of router-to-router links. A /32 represents a single host address and is commonly used in loopback interfaces and host routes.
How this tool works
This tool runs entirely in your browser and our server. We detect your IP address server-side, then perform DNS and WebRTC checks client-side. No account is needed and no personal data is stored beyond anonymous aggregate statistics.
Results are based on real-time checks against your current connection. For the most accurate results, ensure your VPN is fully connected before running the test.
DNS hijacking redirects your legitimate website requests to fake copies designed to steal your credentials. VPNs with encrypted DNS prevent this.