IP Subnet Calculator
Calculate IPv4 subnet details from an IP address and CIDR prefix.
Class A, B & C subnet quick table
Use this as a quick reference for common IPv4 subnet sizes. “Usable hosts” assumes traditional subnetting where the first (network) and last (broadcast) address are reserved. (/31 and /32 are special cases and are not listed.)
| Prefix size | Network mask | Usable hosts per subnet |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| Prefix size | Network mask | Usable hosts per subnet |
|---|---|---|
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| Prefix size | Network mask | Usable hosts per subnet |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
Tool description
This subnet calculator helps you quickly derive network and host details from an IPv4 address and CIDR prefix. It’s useful for configuring routers, firewalls, VPNs, and cloud security groups.
How to use
- Enter an IPv4 address (four numbers separated by dots).
- Enter the CIDR prefix (0–32), for example 24 for a typical /24 subnet.
- Click Calculate to see mask, network, broadcast, and host range.
- Use Copy results to paste the output into tickets or documentation.
Why it’s useful
- Prevent misconfiguration by confirming network boundaries.
- Plan IP allocations and avoid overlapping subnets.
- Understand usable host ranges for addressing and DHCP pools.
Use cases & interpretation
- Security groups: Use the network range to scope inbound rules.
- DHCP pools: Allocate addresses only inside the usable host range.
- Point-to-point links: /31 and /32 have special host behaviors.
Deep dive: IP Subnet Calculator
IP Subnet Calculator is designed to be fast, readable, and practical: you enter a few inputs, the tool shows a clear result, and you can copy or reset in one click.
This page focuses on the “why” and the “how”: what the calculator or converter is doing, which assumptions matter, and how to interpret the output so you can make a better decision.
How it works
Network tools help you answer practical questions: is a domain available, what’s my public IP, who owns an IP range, and what subnet range does this CIDR represent?
Most outputs are derived from public data sources (DNS, RDAP) and standard IPv4 math. The key is interpreting the results correctly.
Privacy note: Smart Web Apps runs tools in your browser whenever possible. We don’t require accounts, and we don’t ask you to upload sensitive inputs for most tools.
Why it’s useful
- Speed up troubleshooting by getting the key facts quickly.
- Avoid configuration mistakes by verifying ranges and ownership.
- Copy clean outputs into tickets and documentation.
Practical tips (better results)
- Confirm whether you’re looking at public IPs vs private ranges (RFC1918).
- For subnets, verify the prefix before writing firewall rules.
- For RDAP/WHOIS, expect privacy redaction—personal details may not be available.
How to sanity-check results: first, try a small input where you can predict the direction (increase an input and confirm the output changes in the expected way). Next, do a quick reverse check when possible (for example, convert there and back, or compare a rate and its inverse). Finally, compare a simplified manual calculation (a single bracket slice, a single unit conversion factor, or a single time interval) to confirm the tool’s logic matches your expectations.
Rounding and formatting matter more than most people expect. Real-world receipts, payroll systems, and financial statements often round at specific steps (line items vs totals). If your result differs by a small amount, it may be a rounding rule rather than a “wrong” calculation. When you share the output, include the rounding assumption (for example, “rounded to 2 decimals”) so the result is reproducible.
Troubleshooting tip: if you see an error, double-check the input format first (commas vs dots, spaces, percent symbols, or mixed units). Then reset and re-enter values slowly. If the tool depends on a public data source, check your connection and any script/privacy blockers that might block requests. When reporting an issue, include the page URL, your browser, and a small example input that reproduces the behavior.
Best practice for planning: treat single-number outputs as an estimate, then run a second scenario that is deliberately conservative (slightly worse assumptions). If your decision still works under conservative inputs, you’re far less likely to be surprised.
When you use IP Subnet Calculator for communication (a quote, a ticket, or a study plan), write one sentence that explains the context: what the inputs represent, what is included, and what is excluded. This prevents misinterpretation—especially for calculators where “taxable income”, “APR”, “workdays”, or “usable hosts” have specific meanings.
Privacy reminder: this site is built to be lightweight and client-side. That said, your device security still matters. Avoid pasting production secrets into any web tool unless you understand your environment. If you need to process sensitive data, consider running the tool in a trusted browser profile on a secure device, and clear your clipboard afterwards.