IP Subnet Calculator | Show Mask, Network, Hosts, and Broadcast
Last updated: June 2026 · Free · No sign-up required
Enter values above and click Calculate to see your result instantly.
Quick reference
CIDR to mask and hosts:
| CIDR | Subnet mask | Usable hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /30 | 255.255.255.252 | 2 |
edit_note What you need
Have your numbers ready before you start. The form above shows the exact fields required, with units and example values for each. Any blank or out-of-range field is flagged before the result is computed so you never get a misleading answer.
function How it computes
The IP subnet calculator applies the published reference formula and rounds the result to a useful precision. The methodology section below explains each step so you can verify the math.
verified Trusted source
Reference values and constants come from an authoritative source. Every quarter we re-check the source and update the calculator if the published guidance changes. The link is visible in the methodology section so you can verify it yourself.
tips_and_updates Read it like this
Read the headline number first, then open the breakdown card to see how each input contributed. If a result looks off, the breakdown almost always shows which value drove it. Adjust that input and recalculate — the answer updates instantly.
Interpretation guide
Subnet terms:
| Term | Meaning |
|---|---|
| Network address | First address in the block |
| Broadcast address | Last address in the block |
| Usable hosts | Total minus network and broadcast |
| CIDR prefix | Number of network bits |
lightbulb Worked example
Result: The calculator instantly applies the formula Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast) and returns the result with appropriate precision.
What this means: Read the result in the context of what you are measuring. The step-by-step breakdown lets you confirm the math and understand which input most affects the outcome.
Formula & methodology
Formula: Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast)
The IP Subnet Calculator is built on a well-established calculation method. It uses the formula Total addresses = 2^(32 - prefix); usable hosts = total - 2 (network + broadcast) to turn your inputs into a reliable result. Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, network address, broadcast address, usable host range, and The steps are shown on the page so you can follow the reasoning from input to output.
The calculator takes an IPv4 address and CIDR prefix and returns the subnet mask, network and broadcast addresses, the usable host range, and host count. The prefix is the number of network bits; the remaining bits address hosts, so total addresses equal 2^(32 - prefix). Two addresses are reserved (network and broadcast), leaving the usable count. This is essential for planning networks and sizing subnets.
What is the IP Subnet Calculator?
The IP Subnet Calculator is a free, browser-based developer tool tool that helps you Breaks an IP address and CIDR prefix into its full subnet details. Enter an address like 192.168.1.0/24, and the tool returns the subnet mask, wildcard mask, ne. Instead of working through the math by hand or in a spreadsheet, you enter your values and the calculator returns an accurate result instantly — while still showing the formula and the steps so you can verify the reasoning. It is designed for quick everyday use: no sign-up, no installation, and everything runs locally in your browser for complete privacy.
How to use the IP Subnet Calculator
- Enter the required values into the input fields.
- Press the calculate button — the result appears immediately, updated live as you change any value.
- Read the step-by-step breakdown below the result to see exactly how the calculation was performed.
- Use the interpretation guide to understand what the result means for your situation, and try different inputs to see how they change the outcome.
How to use the IP Subnet Calculator
Enter an IP address with its CIDR prefix, such as 192.168.1.0/24, and the tool computes the complete subnet details. It applies Total addresses = 2^(32 − prefix) and usable hosts = total − 2 (network and broadcast addresses are reserved). For a /24, that means 256 total addresses and 254 usable hosts. The result includes the subnet mask, wildcard mask, network address, broadcast address, and the usable host range.
Interpreting your result
The network address is the first address of the block — it identifies the subnet itself and can never be assigned to a host. The broadcast address is the last one — traffic sent to it reaches every host on the subnet. The usable range in between is what you can assign to devices: for 192.168.1.0/24, hosts use 192.168.1.1 through 192.168.1.254. The prefix length tells the story: each smaller prefix number doubles the address space, so /23 has 512 addresses and /22 has 1,024, while larger prefixes like /30 (4 addresses, 2 usable) are used for point-to-point links.
Common mistakes to avoid
The most common error is counting the network and broadcast addresses as usable — a /30 link has only 2 usable addresses, not 4. Second, confusing the subnet mask with the wildcard mask: the wildcard is the bitwise inverse (255.255.255.0 becomes 0.0.0.255). Third, misreading the prefix: /24 is not '24 addresses' but 2^(32−24) = 256. Finally, overlapping subnets — two ranges that share addresses cause routing chaos, so always check the network and broadcast of each block before assigning.
Tips for best results
Use the tool when planning VLANs or VPN pools: size each subnet to its actual device count plus 20% headroom. For point-to-point links use /30 or /31, for small offices /24, and for large campuses /16 or shorter. Document every subnet's network, broadcast, and usable range — the calculator output is ready for that spreadsheet. When combining subnets, remember they can only be merged if they are aligned to the larger block's boundary. Verify any externally documented CIDR by entering it here before configuring firewalls or route tables.
Authoritative source: MDN Web Docs
Frequently asked questions
Explore the full developer toolkit
Every CalcaTools developer tool — encoders, formatters, generators, regex, JSON, and API utilities — built for the browser.
- AI Code Explainer | Explain code and suggest fixes
- AI Cron Expression Generator | Translate schedules to cron
- AI Git Commit Generator | Generate Conventional Commit messages
- AI JSON Extractor | Extract structured JSON from text or data
- AI Regex Generator | Build regular expressions from examples
- Bandwidth Calculator | Estimate Transfer Time and Speed
- Hash Generator | Generate MD5, SHA-1, SHA-256, SHA-512 locally
- JSON Formatter | Format, Validate, and Minify JSON Locally
- Schema Markup Generator | Generate JSON-LD structured data
- SERP Preview | Preview Google search title and meta description
- SQL Formatter | Format and Beautify Raw SQL Queries
- Timestamp Converter | Convert Unix Epoch to Readable Dates
- URL Encode Decode | Percent-Encode or Decode Text for URLs
- UUID Generator | Generate Secure Version 4 UUIDs Up to 100