A subnet mask tells your device which part of an IP address identifies your network and which part identifies individual devices on it

When you see an IP address like 192.168.1.50, the subnet mask determines how much of that number belongs to the network itself and how much identifies your specific device. The mask works by turning some of those digits "on" (as 255) and some "off" (as 0). For most home networks, you will see 255.255.255.0, which means the first three number groups identify your network, and the last group identifies your device.

If you set up a device manually instead of letting your router assign an address automatically, you need to know which mask to use — use the wrong one and the device cannot talk to other devices on your network. The mask must match what your router is using, or the device will appear offline even though it is connected to the same Wi-Fi.

Key Takeaways

  • Most home networks use the subnet mask 255.255.255.0, which is the default for private IP addresses starting with 192.168 or 10.
  • You can find your network's subnet mask by checking your router's settings page, your computer's network settings, or asking your internet service provider.
  • The subnet mask must match across all devices on your network — if one device uses a different mask, it will not be able to reach the others.
  • CIDR notation like /24 is shorthand for a subnet mask; /24 means 255.255.255.0, and /16 means 255.255.0.0.

Check your router's settings page to see what mask it assigned

Your router knows its own subnet mask and displays it in the settings. Open a web browser and type 192.168.1.1 or 192.168.0.1 into the address bar — one of these is usually your router's address. Log in with the username and password printed on the router itself (often "admin" and "admin" or "admin" and the router's serial number).

Once you are logged in, look for a section called "LAN Settings", "Network Settings", or "DHCP". The subnet mask will be listed there, usually as 255.255.255.0. Write it down exactly as it appears. If you cannot find it, check your router's manual or search the model number plus "subnet mask" — different brands put this information in different places.

Look at your computer's network settings to see what it is currently using

On Windows, open Settings, go to Network & Internet, then Status. Scroll down and click "View your network properties". Find the line that says "IPv4 Subnet Mask" — that is the mask your computer is using right now.

On Mac, open System Settings, click Network on the left, select your Wi-Fi network, then click Details. Go to the TCP/IP tab and look for "Subnet Mask". On Linux, open a terminal and type ip addr show — the subnet mask appears as a slash and number after the IP address, like /24 (which equals 255.255.255.0).

Understand the relationship between IP address ranges and subnet masks

Private IP addresses — the ones used inside your home network — come in three ranges, and each has a standard subnet mask. Addresses starting with 192.168 (like 192.168.1.50) use 255.255.255.0. Addresses starting with 10 (like 10.0.0.50) usually use 255.255.0.0 or 255.255.255.0 depending on network size. Addresses starting with 172.16 through 172.31 (like 172.16.5.50) typically use 255.255.0.0.

If your IP address starts with 192.168, start by assuming the mask is 255.255.255.0 — this is correct for nearly all home networks. If you set up a device manually and it cannot reach other devices, try changing the mask to match what you found in your router settings. The mask must be identical on every device that needs to communicate.

Convert CIDR notation to a subnet mask if you see a slash number

Sometimes you will see an IP address written as 192.168.1.50/24 or 10.0.0.1/16. The number after the slash is CIDR notation, a shorthand for the subnet mask. Each number represents how many bits of the address belong to the network.

/24 means 24 bits for the network, which equals 255.255.255.0. /16 means 16 bits for the network, which equals 255.255.0.0. /8 means 8 bits, which equals 255.0.0.0. If you need to enter a subnet mask and you only have CIDR notation, use this conversion: /24 becomes 255.255.255.0, /25 becomes 255.255.255.128, /26 becomes 255.255.255.192. For anything beyond /24, you are working with a network smaller than a typical home setup, and you should check your network documentation or ask whoever set it up.

Verify the mask is correct by checking if devices can reach each other

The simplest test is to see if your devices can actually talk to each other. If you just set up a device with a manual IP address and subnet mask, try pinging another device on the network. On Windows or Mac, open a terminal or command prompt and type ping 192.168.1.1 (or whatever your router's IP is). If you get a response, the mask is correct. If you get "no response" or "host unreachable", the mask is wrong.

Another way to check: if all your devices are on the same Wi-Fi network and can see each other in file sharing or network discovery, your subnet masks are already correct. You only need to worry about the mask when you are manually assigning an IP address to a device that is not getting one automatically from the router.

Ask your internet service provider if you are setting up a public IP address

If you are configuring a device with a public IP address (one that connects directly to the internet rather than through your router), the subnet mask comes from your internet service provider. They will give you the IP address, the subnet mask, the gateway address, and the DNS servers all together. Write down all four pieces exactly as they provide them — using the wrong mask for a public address will disconnect that device from the internet.

For almost all home networks, you will never need to do this. Your router handles the public IP address and assigns private addresses to your devices automatically. You only encounter this if you are setting up a business connection, a server, or a device that plugs directly into your modem.

Frequently Asked Questions

What happens if I use the wrong subnet mask?

A device with the wrong mask will not be able to reach other devices on your network, even if it is connected to the same Wi-Fi. It will not be able to see shared files, printers, or your router. The device will appear offline to everything else. Changing the mask to match your router's settings will fix it when ready.

Can different devices on the same network use different subnet masks?

No. All devices on the same network must use the same subnet mask. If one device uses 255.255.255.0 and another uses 255.255.0.0, they will not be able to communicate with each other, even though they are connected to the same router.

Is 255.255.255.0 always the right mask for a home network?

For most home networks, yes. It is the default for private addresses starting with 192.168. If your router is using something different, you will see it in the router settings. Unless you specifically configured a different mask, 255.255.255.0 is almost certainly correct.

What does the subnet mask actually do with the IP address?

The mask uses binary math to separate the network portion from the device portion. Each 255 in the mask means "this part of the IP address is the network", and each 0 means "this part identifies the device". With 255.255.255.0, the first three groups (192.168.1) identify your network, and the last group (the 50 in 192.168.1.50) identifies your specific device.