Subnet Mask Calculator
Convert between CIDR notation and subnet mask, and see wildcard mask and host count, free in your browser with this subnet mask calculator.
Enter Values
How to use this calculator
- Enter the CIDR prefix (0–32).
- Press Calculate for the subnet and wildcard masks.
How it works
The subnet mask is the network bits set to 1: a /24 is 255.255.255.0. The wildcard mask is its inverse (0.0.0.255), used in some ACLs and routing.
Worked example
/26. Mask 255.255.255.192, wildcard 0.0.0.63, 62 usable hosts.
Common mistakes
- Mixing prefix length with mask — /24 equals 255.255.255.0, not 255.255.255.24.
- Assuming every mask falls on an octet boundary; /26 and /30 split within an octet.
Frequently asked questions
What is a subnet mask?
It marks which part of an IP address is the network and which is the host. /24 (255.255.255.0) reserves the first three octets for the network.
How do prefix length and mask relate?
The prefix is the count of 1-bits in the mask, so /24 means 24 network bits, which is 255.255.255.0.
What is a wildcard mask?
The inverse of the subnet mask (e.g. 0.0.0.63 for a /26). Cisco ACLs and OSPF use it to match a range of addresses.
Related tools
- IP Range Calculator
- Subnet Hosts Calculator
- Download Time Calculator
- Mbps to MB/s Calculator
- Bandwidth Calculator
- Data Usage Calculator
Explore more in Networking, IT & Sysadmin.
Cite this tool
Zerdly. (2026). Subnet Mask Calculator. Retrieved from https://www.zerdly.com/tools/subnet-mask-calculator/
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



