Subnet Mask vs Wildcard Mask: What’s the Difference?

By CalculatorBase Editorial Team · Published November 21, 2026 · Updated November 14, 2026 · 2 min read

Subnet Mask vs Wildcard Mask: What's the Difference?

Quick answer: A wildcard mask is the inverse of a subnet mask: subtract each octet from 255. The mask 255.255.255.0 (/24) has wildcard 0.0.0.255, and 255.255.255.192 (/26) has wildcard 0.0.0.63. Subnet masks mark network bits with 1s; wildcard masks mark the bits that may vary.

Conversions

CIDR Subnet mask Wildcard mask
/16 255.255.0.0 0.0.255.255
/22 255.255.252.0 0.0.3.255
/24 255.255.255.0 0.0.0.255
/26 255.255.255.192 0.0.0.63
/28 255.255.255.240 0.0.0.15
/30 255.255.255.252 0.0.0.3

Where Wildcards Appear

Some router access control lists and routing statements use wildcard masks. For example, 192.168.1.0 0.0.0.255 matches every address from 192.168.1.0 to 192.168.1.255. Syntax varies by vendor, so check your platform’s documentation.

Quick Method

Subtract each octet of the subnet mask from 255. See CIDR notation for prefix lengths.

Calculate

The Subnet Calculator shows both masks for a CIDR block.

Tips for Accurate Results

Enter the network address with its prefix length, and remember network and broadcast addresses are not usable hosts.

Common mistakes with everyday calculations: using the wrong units, forgetting leap years or breaks, and trusting a rounded result for something that needs an exact one. Double-check anything critical.

Try the Subnet Calculator

Skip the manual work and get an instant result with our free Subnet Calculator. Enter your numbers, see the answer immediately and adjust the inputs to compare scenarios.

More calculators you may find useful: Password Generator.

Related guides

Frequently asked questions

What is a wildcard mask?

The inverse of a subnet mask.

What is the wildcard of /24?

0.0.0.255.

Where is it used?

In some ACL and routing configs.

Is it always contiguous?

Not necessarily, unlike a subnet mask.

Results from tools and formulas are estimates for everyday use. Verify anything critical, such as security, building or legal deadlines, against official guidance.

Explore other calculators