🌐 Wildcard Mask Calculator
Instantly convert subnet masks to wildcard masks, calculate CIDR ranges, and plan ACL configurations
| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts | Common Use |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | Class A / Large ISP |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | RFC 1918 Private (172.16) |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | Campus / Enterprise |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | Mid-size VLAN |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | Multi-floor VLAN |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | Medium Office |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | Standard LAN / Home |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | Half-subnet Split |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | Small Department |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | Small Team |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | Small VLAN / DMZ |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | Server Cluster |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | Point-to-Point Link |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2* | P2P (RFC 3021) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | Host Route / Loopback |
| ACL Match Goal | IP Address | Wildcard Mask | Cisco ACL Syntax |
|---|---|---|---|
| Match single host | 192.168.1.10 | 0.0.0.0 | host 192.168.1.10 |
| Match any host | 0.0.0.0 | 255.255.255.255 | any |
| Match /24 subnet | 192.168.1.0 | 0.0.0.255 | 192.168.1.0 0.0.0.255 |
| Match /16 block | 10.10.0.0 | 0.0.255.255 | 10.10.0.0 0.0.255.255 |
| Match odd octets | 0.0.0.1 | 0.0.0.254 | 0.0.0.1 0.0.0.254 |
| Match even octets | 0.0.0.0 | 0.0.0.255 | 0.0.0.0 0.0.0.254 |
| RFC 1918 Class A | 10.0.0.0 | 0.255.255.255 | 10.0.0.0 0.255.255.255 |
| RFC 1918 Class C | 192.168.0.0 | 0.0.255.255 | 192.168.0.0 0.0.255.255 |
| Project / Scenario | Recommended CIDR | Wildcard Mask | Usable Hosts | Subnet Mask |
|---|---|---|---|---|
| Home Lab (Proxmox / VMs) | /24 | 0.0.0.255 | 254 | 255.255.255.0 |
| Small Office (10-30 users) | /27 | 0.0.0.31 | 30 | 255.255.255.224 |
| Mid-size Office (50-100) | /25 | 0.0.0.127 | 126 | 255.255.255.128 |
| Enterprise (200-500 users) | /23 | 0.0.1.255 | 510 | 255.255.254.0 |
| DMZ / Guest WiFi | /28 | 0.0.0.15 | 14 | 255.255.255.240 |
| IoT Segment | /26 | 0.0.0.63 | 62 | 255.255.255.192 |
| Server VLAN | /29 | 0.0.0.7 | 6 | 255.255.255.248 |
| WAN / P2P Uplink | /30 | 0.0.0.3 | 2 | 255.255.255.252 |
network 192.168.1.0 0.0.0.255 area 0). For a /30 link, use wildcard 0.0.0.3. For a loopback (/32), always use wildcard 0.0.0.0.
A wildcard mask is made up of 32 bits, that commonly appears in network connections. It seems a bit like a subnet mask at first look, four numbers separated by dots and shared in four octets, but here ends the likeness. The main difference lies in its function: it points to routers, what parts of an IP address one considers and what to simply ignore.
Here is how the math works. If in a wildcard mask appears a 0-bit, that requires that the matching bit in the IP address matches exactly. On the other hand, a 1-bit allows any value here, it simply does not matter what happens.
What is a wildcard mask?
Like this, a wildcard mask of 0.0.0.255 points only to the last eight bits. The three first octets must match perfectly, while the final octet can be anything.
One meets wildcard masks most commonly during work with access control lists or ACLs. They also matter in routing protocols, for instance OSPF. During work with OSPF, the network command together with a wildcard mask explains to the router what interfaces should use OSPF flooding.
When the IP address of an interface matches with the network address and the wildcard mask, it activaets, the interface enters in the routing protocol. Then it starts to send hello packets and search for neighbours.
What surprises about wildcard masks is that they do not always have to be continuous. Subnet masks? Those always have all ones first, then all zeros.
Wildcard masks break that rule, the ones and zeros can arrange in various patterns. That flexibility makes them better for particular or unusual comparisons. For instance, a wildcard mask of 0.0.0.254 wood allow matching only even-numbered IP addresses.
Here is a handy conversion trick: simply subtract every octet from 255. Like this a subnet mask of 255.255.255.0 turns into a wildcard mask of 0.0.0.255. Also, if you wonder what numbers count for an octet in a wildcard mask, that is only 1, 3, 7, 15, 31, 63, 127 and 255.
Want to match only one exact IP address? Then your wildcard mask will be 0.0.0.0, every bit must match perfectly. Instead of writing that out, you can use the keyword “host” with it.
Saying “host 192.168.1.1” does the same as “192.168.1.1 0.0.0.0.”
Basically, a wildcard mask is the bit reverse of a subnet mask. While a subnet mask separates the network part from the host part, a wildcard mask simply points to the router what to mind and what to skip. Picture this: an admin wants to block all traffic from the network 172.16.56.0.
Rather than filter addresses one after the other, a wildcard mask covers the whole range in one step. Subnet calculators can help a lot here (they take an IP address and a netmask), and give thewildcard mask result.
Wildcard masks work also with MAC addresses, where they show what hex figures matter and what ones to ignore. Every figure in the mask matches with a figure in the MAC address, and such masks are 12 figures long.



