Home / Network Tools / Subnet Mask Calculator
Network Tools

Subnet Mask Calculator

Translate /prefix and dotted-decimal subnet masks in either direction and reject non-contiguous mask bits.

—CIDR prefix
—Subnet mask
—Wildcard mask
—Total addresses
ReadyConvert a dotted subnet mask or CIDR prefix.

Subnet mask capacity & boundary audit

The fast mask converter above remains first. This optional audit reuses WTA39 to connect the mask to an example IPv4 network, show wildcard/binary/range evidence, and calculate the smallest prefix that fits a required usable-host count.

Uses the current primary mask and example IP; calculations stay in this browser.

Practical guide and verification

Use the tool first, then apply these checks to verify inputs, interpret the result, and hand it off without displacing the primary workflow.

Reject non-contiguous dotted masks

A normal IPv4 subnet mask is a run of network bits followed by host bits. A dotted value can look mask-like while containing a one bit after a zero bit. Convert it to binary or use a contiguous-mask check before treating the value as CIDR, because invalid masks can otherwise produce misleading network boundaries.

Distinguish total addresses from usable hosts

For conventional IPv4 subnets through /30, network and broadcast addresses reduce the usual host count by two. /31 point-to-point links and /32 host routes are special cases. Keep that rule visible when sizing a subnet by required hosts instead of applying one simplified formula to every prefix.

Verify an example IP against the calculated boundary

A mask alone does not identify a network. Combine the prefix with an actual IPv4 address, then verify network, broadcast, first host, and last host. This catches the common mistake of assuming the typed host address is already the network address simply because the prefix is correct.

Separate mathematical fit from network policy

The smallest prefix that fits a host count is only a capacity result. Reserve space for gateways, infrastructure, growth, redundancy, addressing policy, and route aggregation as required by the real network. Private/public classification and CIDR arithmetic do not confirm that a block is assigned or routable in a particular environment.

Search by task, tool name, or category. Press Esc to close.
Start typing to find a tool.