What Is a Subnet Mask? A Home Network Explanation

September 30, 2026

Blue network cables with white connectors plugged into a patch panel inside a dark server rack

Photo: pexels · PEXELS

Published 5 min read

A subnet mask is a number that tells a device which part of an IP address identifies the network and which part identifies the individual device. It looks like an IP address, for example 255.255.255.0, and your computer uses it to decide whether another device is on the same local network or has to be reached through the router.

What the numbers in a mask are telling you

An IPv4 address such as 192.168.1.25 is really a string of 32 ones and zeros, split into four groups of eight and written as four numbers from 0 to 255. The subnet mask is written the same way and lines up with the address bit for bit.

Where the mask has ones, that part of the address is the network. Where it has zeros, that part belongs to the device. In the mask 255.255.255.0, each 255 is eight ones and the final 0 is eight zeros. So in 192.168.1.25, the network is 192.168.1 and the device is number 25 on that network.

Think of a street address. The network part is the street name, and the device part is the house number. Everyone on the same street can talk directly, and anything else goes through the router.

Your computer runs this check every time it sends data. Say your laptop is 192.168.1.25 with a mask of 255.255.255.0 and it wants to reach a printer at 192.168.1.40. The first three numbers match, so the laptop sends the job directly to the printer. If it wants to reach a website at an address that starts with different numbers, the mask shows that address is outside the local network, so the laptop hands the traffic to the router, also called the default gateway.

Gray ethernet cables plugged into a network switch with small green status lights
Photo by Bru-nO via Pixabay (PIXABAY)

Common subnet masks and how many devices each allows

The table lines up the masks you are most likely to see, based on the IETF’s subnet reference table, RFC 1878.

Slash form Dotted mask Total addresses Usable device addresses
/8 255.0.0.0 16,777,216 16,777,214
/16 255.255.0.0 65,536 65,534
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/30 255.255.255.252 4 2

Two addresses in each block are reserved. The first names the network itself and the last is the broadcast address used to reach every device on the subnet simultaneously. That is why a /24 holds 254 devices rather than 256.

Slash notation is the same mask written shorter

Network tools often write a mask as a slash and a number, like 192.168.1.0/24. The number counts how many ones the mask starts with. Twenty-four ones is 255.255.255.0, sixteen is 255.255.0.0, and eight is 255.0.0.0. The two styles carry exactly the same information, and router menus may use either one.

The private address ranges used inside homes and offices are defined the same way in RFC 1918, which sets aside 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks.

Finding the subnet mask on your own computer

  1. On Windows, open Command Prompt, type ipconfig and press Enter. Look for the Subnet Mask line under your active Wi-Fi or Ethernet adapter.
  2. On a Mac, open the network settings, select your connection, and look in its details for the TCP/IP information.
  3. On a phone, tap the connected Wi-Fi network in settings. Many phones show the IP address and some show the mask or prefix length there.
  4. On the router, sign in to its admin page or app and look under LAN or local network settings.

When you would ever need to change it

Usually you won’t. Your router hands out an address and mask automatically, and every device on the network receives matching settings. Trouble starts when someone types settings in by hand and the mask doesn’t match the rest of the network. Then a printer or camera may be reachable from one computer but invisible from another.

If you’re setting a fixed address for a device, copy the mask your other devices already use. Changing the mask on the router affects everything connected, so leave it alone unless you’re rebuilding the network on purpose.

The one time home users sometimes touch it is when a network runs out of room. A /24 has space for 254 devices, which is plenty for most homes, but a large house full of smart plugs, cameras and phones can be split up or given a bigger range. That job is easier with your router’s documentation open.

Frequently asked questions

What is the most common subnet mask for a home network?

You will very often see 255.255.255.0, written as /24, on home networks, which allows up to 254 devices. Your own router may use something different. Check the subnet mask line in your computer's network details, or the LAN settings on your router, to see what your network actually uses.

Is a subnet mask the same as a default gateway?

No. The subnet mask defines which addresses belong to your local network. The default gateway is the address of the router your device sends traffic to when the destination is outside that network. Both appear together in network settings, and devices need both to reach the internet.

Do IPv6 addresses use subnet masks?

IPv6 does not use dotted masks like 255.255.255.0. It describes the network portion with a prefix length written after a slash, such as /64. The idea is the same, dividing the address into a network part and a device part, but the notation is different.

What is a subnet?

A subnet is a smaller network carved out of a larger block of IP addresses. Devices on the same subnet share the network part of their addresses and can reach each other directly, while traffic bound for a different subnet goes through a router. The subnet mask is what marks where the network part ends.

How do you find the subnet mask from an IP address?

You can't work it out from the address alone, since the same address can belong to networks of different sizes. Check the device's settings or the router's LAN page. Under the old class system, addresses starting 1 to 126 defaulted to 255.0.0.0, 128 to 191 to 255.255.0.0 and 192 to 223 to 255.255.255.0, but classless addressing lets any mask apply.

How do you calculate a subnet mask?

Start from how many devices the network needs. Add 2 for the reserved network and broadcast addresses, round up to the next power of 2, and subtract that power's exponent from 32. For 50 devices, 52 rounds up to 64, which is 2 to the 6th, so the prefix is /26, or 255.255.255.192, with 62 usable addresses.

Related reading