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
255.255.255.192
Prefix length
/26
Wildcard mask
0.0.0.63
Mask in binary
11111111.11111111.11111111.11000000
Mask in hex
0xFFFFFFC0
Network address
192.168.10.0
Broadcast address
192.168.10.63
Usable hosts
62

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

  1. Enter an IP address, for example 192.168.10.25.
  2. In the mask field type 255.255.255.192 or /26 — both work.
  3. Get the mask in decimal, binary and hex, the wildcard and the network details.

Examples

Input
192.168.10.25 + 255.255.255.192
Result
/26, wildcard 0.0.0.63, network 192.168.10.0, 62 hosts
Input
10.0.0.1 + /20
Result
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.