Subnet Mask to CIDR Converter
Convert /24-style prefixes and dotted subnet masks into each other with address counts.
Enter network values
Use the example or enter your own subnet, plan, MAC, or port value.
Results update locally in your browser.
Convert between prefix length, subnet mask, wildcard mask, total addresses, and usable host count.
Subnet mask ↔ CIDR detail
Use the table and bit view to verify dotted masks, prefixes, wildcard masks, and host capacity.
256 total addresses · 254 usable host slots for ordinary IPv4 subnets.
/24 (255.255.255.0) is the common default with 254 usable hosts; verify growth before standardizing on it.
Wildcard bits are the inverse of subnet mask bits. They are common in Cisco ACL and OSPF statements.
Copy mask review memo
Copies locally from this browser session only; CalcShelf does not save the value.
| Octet | Subnet mask bits | Wildcard bits |
|---|---|---|
| 1 | 11111111 | 00000000 |
| 2 | 11111111 | 00000000 |
| 3 | 11111111 | 00000000 |
| 4 | 00000000 | 11111111 |
| Option | CIDR | Mask | Wildcard | Total addresses | Usable hosts | Address change | Planning note |
|---|---|---|---|---|---|---|---|
| One size larger | /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | +256 | Doubles the address span for more headroom. |
| Current size | /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | — | Entered mask size. |
| One size smaller | /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | -128 | Halves the address span for tighter segmentation. |
| CIDR | Subnet mask | Wildcard | Total addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Notes
These are planning and conversion utilities. Confirm production network changes against your router, firewall, cloud provider, and ISP requirements before applying them.
Get a better answer from the Subnet Mask to CIDR Converter
- Start with the example values to see how the tool behaves.
- Swap in your own numbers, even if they are rough first-pass estimates.
- Change one input at a time so you can see what actually moves the result.
What the result means
The result turns network notation into something easier to read: ranges, host counts, masks, wildcard masks, ports, or planning blocks.
How to use it
Use the output to plan or double-check, then compare it with the real network before changing a route, VLAN, DHCP scope, firewall rule, or ACL.
What can change it
A valid network number can still be wrong for your environment if it overlaps, conflicts with routing, exposes traffic, or breaks change-control rules.
Example to try
Convert /24 to 255.255.255.0 and 0.0.0.255, then check whether the usable-host count actually fits the VLAN or DHCP scope.
Assumption to challenge
A mask only describes block size. It does not prove the range is free, routed correctly, or safe to deploy.
Verify next
Confirm the parent allocation, gateway convention, existing leases/static IPs, routing, ACLs, DHCP exclusions, and documentation before changing production.
Key terms
CIDR prefix
The slash number, such as /24, that tells how many bits are fixed as the network portion.
Subnet mask
The dotted-decimal form of the network bits, such as 255.255.255.0.
Wildcard mask
The inverted mask often used in ACL and routing statements, such as 0.0.0.255 for /24.
Common uses
- Convert /24 to 255.255.255.0.
- Convert dotted masks to prefixes.
- Compare host counts by prefix.
Common questions
Is the Subnet Mask to CIDR Converter private?
Yes. CalcShelf calculators run without an account, do not save calculator entries, and do not put raw inputs into shareable URLs or analytics events.
How accurate is the Subnet Mask to CIDR Converter?
It follows common IPv4, CIDR, mask, range, and port conventions. Production networks still need live-config, routing, ACL, overlap, and change-control review.
What should I check after using the Subnet Mask to CIDR Converter?
Verify live allocations, overlaps, gateway conventions, routes, ACL/firewall order, documentation, and rollback plan before production changes.
Which calculator should I try next?
Use the related calculators below to cross-check the same decision from another angle before you act.
Method behind the estimate
Networking tools use IPv4, CIDR, subnet mask, wildcard mask, range, VLAN, DHCP, and port-reference rules for planning and sanity checks.
Why the detail matters
Before changing production routing, firewall, VLAN, DHCP, or address plans, verify against the actual network, documentation, and change-control process.
Privacy guardrail
Your calculator values are for you. CalcShelf does not require an account, save calculator entries, put your numbers into shareable URLs, or use raw inputs as analytics events.
Copy or print safely
Use any copy, print, or worksheet controls as local handoff tools for your own notes, supplier calls, lender questions, or implementation checklist. They are there to help you explain the result to a human.
Before acting
Treat the result as a decision draft, not a verdict. Recheck the source numbers, run a downside case, and verify the real-world rule, quote, label, or spec that controls the final answer.
Last reviewed: May 11, 2026. See methodology and editorial policy for formulas, assumptions, rounding, review approach, and limitations. For network changes, verify against live configuration, vendor docs, and change-control requirements.