Networking

Subnet Mask to CIDR Converter

Convert /24-style prefixes and dotted subnet masks into each other with address counts.

Step 1

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.

Use verified network plans before changing production routing, ACLs, or firewall rules.
Mask workspace

Subnet mask ↔ CIDR detail

Use the table and bit view to verify dotted masks, prefixes, wildcard masks, and host capacity.

/24 = 255.255.255.0

256 total addresses · 254 usable host slots for ordinary IPv4 subnets.

Common LAN/VLAN size

/24 (255.255.255.0) is the common default with 254 usable hosts; verify growth before standardizing on it.

Wildcard 0.0.0.255

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.

OctetSubnet mask bitsWildcard bits
11111111100000000
21111111100000000
31111111100000000
40000000011111111

Decision checklist

Typical use: Small office VLAN, lab subnet, guest network, or simple DHCP scope.

  • Check whether one VLAN should really be split into smaller security zones.
  • Reserve gateway, infrastructure, printer, and static addresses before sizing DHCP.
  • Confirm the owner/purpose before using the mask in routing, ACL, VPN, or DHCP work.
  • Check the adjacent-size table so the block is not one bit too broad or too tight.
  • Document the wildcard mask separately when copying into ACL or OSPF syntax.

Adjacent-size capacity check

Compare the entered mask with the next larger and smaller block before picking a subnet size.

OptionCIDRMaskWildcardTotal addressesUsable hostsAddress changePlanning note
One size larger/23255.255.254.00.0.1.255512510+256Doubles the address span for more headroom.
Current size/24255.255.255.00.0.0.255256254Entered mask size.
One size smaller/25255.255.255.1280.0.0.127128126-128Halves the address span for tighter segmentation.

Common subnet masks

Quick reference for the masks most often used in LANs, VPNs, loopbacks, and point-to-point links.

CIDRSubnet maskWildcardTotal addressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/16255.255.0.00.0.255.25565,53665,534
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Notes

These are planning and conversion utilities. Confirm production network changes against your router, firewall, cloud provider, and ISP requirements before applying them.

Use it well

Get a better answer from the Subnet Mask to CIDR Converter

  1. Start with the example values to see how the tool behaves.
  2. Swap in your own numbers, even if they are rough first-pass estimates.
  3. 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.