Wildcard Mask Calculator

Developer·Free · in browser

Wildcard Mask Calculator

Convert a CIDR prefix or subnet into the wildcard mask Cisco ACLs and OSPF network statements expect, with the subnet mask and address range alongside it.

Wildcard Mask Calculator
All tools

A wildcard mask is the bitwise inverse of a subnet mask, and it is what Cisco IOS access lists and OSPF network statements take instead of a netmask. A /24 has a subnet mask of 255.255.255.0 and a wildcard mask of 0.0.0.255. Enter an address in CIDR notation and the wildcard mask comes back first.

Runs entirely in your browser · no signup · nothing is uploaded · updated 2026-09-08

Wildcard mask
0.0.0.255
Subnet mask
255.255.255.0
Prefix
/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
Total addresses
256

How to use it

  1. 1.Enter the network in CIDR notation, for example 10.0.0.0/16.
  2. 2.Read the wildcard mask at the top, with the subnet mask and range beneath it.
  3. 3.Paste the wildcard mask into your ACL or OSPF network statement.

Common prefixes and their wildcard masks

Subtract each subnet mask octet from 255 and you have the wildcard mask. A 0 bit in a wildcard mask means the bit must match; a 1 bit means it is ignored.

PrefixSubnet maskWildcard maskAddresses
/8255.0.0.00.255.255.25516,777,216
/16255.255.0.00.0.255.25565,536
/24255.255.255.00.0.0.255256
/25255.255.255.1280.0.0.127128
/26255.255.255.1920.0.0.6364
/27255.255.255.2240.0.0.3132
/28255.255.255.2400.0.0.1516
/30255.255.255.2520.0.0.34
/32255.255.255.2550.0.0.01

Frequently asked questions

What is a wildcard mask?

The bitwise inverse of a subnet mask, used by Cisco IOS to say which address bits matter. A 0 means the bit must match exactly; a 1 means ignore it. It is the opposite convention to a subnet mask, which is why they are so easy to mix up.

How do I convert a subnet mask to a wildcard mask?

Subtract each octet from 255. 255.255.255.0 becomes 0.0.0.255; 255.255.240.0 becomes 0.0.15.255. That is all there is to it.

Where do I need a wildcard mask instead of a subnet mask?

Cisco IOS access control lists, OSPF and EIGRP network statements, and route maps. Interface addressing still takes a normal subnet mask, which is the source of most of the confusion.

What does a wildcard mask of 0.0.0.0 mean?

Match this exact address and nothing else - the equivalent of a /32. In an ACL you can write it as the keyword host instead, and most style guides prefer that for readability.

What does 255.255.255.255 mean as a wildcard mask?

Ignore every bit, so match any address at all. IOS lets you write this as the keyword any.

Can a wildcard mask be non-contiguous?

Yes, and that is the one real capability a subnet mask lacks. A wildcard of 0.0.0.254 matches only even-numbered hosts. It is legal, occasionally useful, and worth a comment in the config because the next engineer will assume it is a typo.

Why does Cisco use wildcard masks at all?

They came from the original ACL implementation, where inverting the mask made the bit test cheaper in hardware. The convention outlived the reason, and newer platforms such as NX-OS and ASA accept prefix lengths directly.

Is a wildcard mask the same as an inverse mask?

Yes - inverse mask, wildcard mask and, in older Cisco documentation, don't-care bits all describe the same thing.

Tools that pair with this one

Built something?

RankCert is a weekly launch board where products rank on domain control we verify ourselves - not upvotes. Listing is free and the link is dofollow whether or not you display our badge.