Convert a subnet mask into its wildcard mask equivalent for ACLs and OSPF.
A wildcard mask is the bitwise inverse (NOT) of a subnet mask: every 0 bit in the subnet mask becomes a 1, and every 1 becomes a 0. Equivalently, wildcard = 255.255.255.255 − subnet mask. Cisco IOS access control lists (ACLs) and OSPF network statements use wildcard masks instead of subnet masks to define which address bits must match (0) and which are 'don't care' (1).
Wildcard from subnet mask
wildcard = 255.255.255.255 − subnet_mask
ACLs and some routing protocol configurations (like OSPF network statements) were designed with wildcard mask syntax so administrators can specify 'match' bits (0) versus 'ignore' bits (1) explicitly, which is more flexible than a strict subnet mask for defining discontiguous ranges.
Apply the same inversion again — subtract each octet from 255 (or 255.255.255.255 as a whole). Inverting a wildcard mask returns the original subnet mask.
Yes — unlike subnet masks, wildcard masks used in ACLs can have discontiguous 1-bits to match unusual address patterns, though this calculator assumes a standard contiguous mask input.