Wildcard Mask Calculator
Convert between a wildcard mask, a subnet mask and a prefix length, and work out the network, broadcast and host range for an IP address. Useful for writing Cisco ACLs and OSPF network statements.
1 Fill in the boxes
2 Your answer
Your answer shows here as you type.
How to use the Wildcard Mask Calculator
- Enter the IP address, for example 192.168.1.10.
- Choose whether your mask is a prefix length, a subnet mask or a wildcard mask.
- Type the mask in that format. The results update as you type.
Frequently asked questions
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. A 0 bit means the address bit must match exactly, and a 1 bit means the bit can be anything. For example, the subnet mask 255.255.255.0 has the wildcard mask 0.0.0.255.
How do you calculate a wildcard mask from a subnet mask?
Subtract each octet of the subnet mask from 255. For 255.255.255.252, the result is 0.0.0.3, because 255 minus 252 is 3.
Where are wildcard masks used?
Cisco IOS access control lists and OSPF network statements use wildcard masks. Most other systems, such as operating system routing tables and firewall rules, use subnet masks or prefix lengths.
How many usable hosts are in a /24 network?
A /24 network has 256 addresses. Two are reserved, the network address and the broadcast address, so 254 hosts can be assigned. The formula is 2 to the power of (32 minus the prefix length), minus 2.
Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.