Subnet mask calculator
Enter an IP address and a mask in either form — 255.255.255.0 or /24. You get every equivalent notation of the mask and the network details.
For example 192.168.1.10 or 192.168.1.10/24
255.255.255.0 or /24
- Subnet mask
- Prefix length
- Wildcard mask
- Mask in binary
- Mask in hex
- Network address
- Broadcast address
- Usable hosts
Runs in your browser. Nothing you enter is sent to our server.
About this tool
A subnet mask and a CIDR prefix are two ways of writing the same thing: 255.255.255.0 in binary has 24 consecutive ones, so it equals /24. Windows and router settings usually ask for the mask, while documentation and cloud consoles use the prefix.
The calculator checks that the mask is valid — its ones must be contiguous. A mask like 255.0.255.0 is rejected with a clear explanation.
How to use
- Enter an IP address, for example
192.168.10.25. - In the mask field type
255.255.255.192or/26— both work. - Get the mask in decimal, binary and hex, the wildcard and the network details.
Examples
192.168.10.25 + 255.255.255.192
/26, wildcard 0.0.0.63, network 192.168.10.0, 62 hosts
10.0.0.1 + /20
Mask 255.255.240.0, hex 0xFFFFF000, 4094 hosts
Frequently asked questions
How do I convert a mask to CIDR by hand?
Write each octet in binary and count the ones: 255 = 8, 240 = 4, 0 = 0. For 255.255.240.0 that is 8 + 8 + 4 = 20, so /20.
Which values can a mask octet have?
Only 0, 128, 192, 224, 240, 248, 252, 254 and 255 — anything else breaks the run of ones.
What mask does a home network use?
Usually 255.255.255.0 (/24), which leaves 254 addresses for devices.