Skip to main content
IP Range CalculatorPRO
Masks, Wildcards & ACLInstant Client-Side Tool

Subnet Mask to Wildcard Converter

Calculate the inverse IPv4 mask.

Subnet Mask to Wildcard Converter: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

How Subnet Mask to Wildcard Converter Works?

This tool works by subtracting each mask octet from 255, which flips every bit of the mask.

  1. Enter a mask or prefix

    Type 255.255.240.0 or /20.

  2. Validate the mask

    The converter confirms that the mask is contiguous.

  3. Subtract each octet from 255

    255 − 255 = 0, 255 − 255 = 0, 255 − 240 = 15, 255 − 0 = 255.

  4. Return the wildcard

    The result is 0.0.15.255, ready for ACL and OSPF statements.

Subnet Mask to Wildcard Converter Formula

The formula is Wildcard = 255.255.255.255 − Subnet Mask, applied octet by octet.

Per-octet rule

W_i = 255 − M_i

For each of the 4 octets.

Bitwise rule

W = NOT M

Flips all 32 bits.

From prefix

W = 2^(32−p) − 1

For /20: 4,095 = 0.0.15.255.

Worked example: 255.255.240.0

255 − 255 = 0
255 − 255 = 0
255 − 240 = 15
255 − 0   = 255
Wildcard = 0.0.15.255

Subnet Mask to Wildcard Converter Conversion Table

The table lists the wildcard mask for 17 subnet masks, /16 through /32, with the binary form of each wildcard.

Subnet MaskCIDRWildcard MaskWildcard Binary
255.255.0.0/160.0.255.25500000000.00000000.11111111.11111111
255.255.128.0/170.0.127.25500000000.00000000.01111111.11111111
255.255.192.0/180.0.63.25500000000.00000000.00111111.11111111
255.255.224.0/190.0.31.25500000000.00000000.00011111.11111111
255.255.240.0/200.0.15.25500000000.00000000.00001111.11111111
255.255.248.0/210.0.7.25500000000.00000000.00000111.11111111
255.255.252.0/220.0.3.25500000000.00000000.00000011.11111111
255.255.254.0/230.0.1.25500000000.00000000.00000001.11111111
255.255.255.0/240.0.0.25500000000.00000000.00000000.11111111
255.255.255.128/250.0.0.12700000000.00000000.00000000.01111111
255.255.255.192/260.0.0.6300000000.00000000.00000000.00111111
255.255.255.224/270.0.0.3100000000.00000000.00000000.00011111
255.255.255.240/280.0.0.1500000000.00000000.00000000.00001111
255.255.255.248/290.0.0.700000000.00000000.00000000.00000111
255.255.255.252/300.0.0.300000000.00000000.00000000.00000011
255.255.255.254/310.0.0.100000000.00000000.00000000.00000001
255.255.255.255/320.0.0.000000000.00000000.00000000.00000000

What is Subnet Mask to Wildcard Converter?

The Subnet Mask to Wildcard Converter is a tool that calculates the wildcard mask, the bitwise inverse of a subnet mask. 255.255.255.0 becomes 0.0.0.255.

Cisco IOS ACLs, OSPF network statements, and EIGRP configurations use wildcard masks. A 0 bit in a wildcard means "must match" and a 1 bit means "ignore". The inverse of a subnet mask produces a wildcard that matches exactly that subnet.

Mixing up the 2 formats is a common configuration error. A subnet mask entered where a wildcard is expected matches the wrong addresses without any error message.

What are the uses of Subnet Mask to Wildcard Converter?

There are 4 main uses of the Subnet Mask to Wildcard Converter, including ACL entries, OSPF statements, and EIGRP configuration.

  • Writing Cisco ACL entries

    access-list 10 permit 10.1.16.0 0.0.15.255 matches the /20 subnet.

  • Configuring OSPF areas

    network 10.1.16.0 0.0.15.255 area 0 enables OSPF on matching interfaces.

  • Configuring EIGRP networks

    EIGRP network commands accept a wildcard to select interfaces.

  • Checking existing configurations

    Reviewers convert wildcards back to masks to confirm the intended subnet.