NetCalc
Dark mode
NC

Subnet Mask

-

Wildcard Mask

-

CIDR Prefix Length

-

How to use the wildcard mask calculator

  1. Enter a subnet mask in either dotted-decimal or CIDR form.
  2. Get the matching wildcard (inverse) mask used by Cisco ACLs and OSPF area declarations.
  3. Copy the result straight into an access-list or network statement.

Frequently asked questions

How is a wildcard mask different from a subnet mask?

A wildcard mask is the bitwise inverse of a subnet mask. Where a subnet mask uses 1s to mark network bits, the wildcard uses 0s to mark bits that must match.

Why does Cisco use wildcard masks in ACLs?

Wildcard masks let an ACL match non-contiguous bit patterns, which subnet masks cannot represent. In practice most ACLs use contiguous wildcards equivalent to a CIDR prefix.

Can wildcard masks be non-contiguous?

Yes. A wildcard like 0.0.255.255 matches any second-half octet, but 0.0.0.85 matches only odd third-octet values — useful for advanced filtering tricks.

What wildcard mask matches a single host?

0.0.0.0 — every bit must match exactly. Cisco IOS also accepts the keyword host as a shorthand.