What a subnet mask does and why you need one

A subnet mask tells your router which part of an IP address identifies your network and which part identifies individual devices on that network. When you set up a home network, you choose an IP range — say, 192.168.1.0 to 192.168.1.255 — and the subnet mask defines the boundaries of that range so devices can find each other without broadcasting to the entire internet.

The mask works by using four numbers (called octets), each between 0 and 255, written the same way as an IP address: 255.255.255.0 is a common example. A 255 in the mask means "this part of the address is the network"; a 0 means "this part identifies the device." Most home networks use one of three masks, and you can calculate which one fits your range in under a minute.

Key Takeaways

  • The three most common home subnet masks are 255.255.255.0 (supports up to 254 devices), 255.255.255.128 (supports up to 126 devices), and 255.255.255.192 (supports up to 62 devices).
  • To find the right mask, count how many usable IP addresses you need, then match that number to the mask that covers it.
  • The first address in your range is the network address, the last is the broadcast address, and devices use everything in between.
  • Most home routers default to 255.255.255.0, which works for any home network with fewer than 250 connected devices.

The three masks that work for home networks

Home networks almost always use one of three subnet masks. The first octet is always 255.255.255, and the fourth octet changes based on how many devices you need to support.

Subnet MaskUsable AddressesBest For
255.255.255.0254 devicesMost home networks; the default on most routers
255.255.255.128126 devicesSmaller networks or when you want to split one range into two separate networks
255.255.255.19262 devicesVery small networks or advanced setups with multiple subnets

Unless you are running a large smart home with hundreds of devices or deliberately splitting your network into separate zones, use 255.255.255.0. It is the standard, your router expects it, and it gives you room to grow.

How to match your IP range to the right mask

Start by deciding your IP range. Most home routers use 192.168.1.0 to 192.168.1.255, but some use 192.168.0.0 or 10.0.0.0. The range you choose does not matter — what matters is how many addresses it contains.

Count the addresses in your range by subtracting the first number from the last. If your range is 192.168.1.0 to 192.168.1.255, that is 255 minus 0 = 255 total addresses. Subtract 2 (one for the network address, one for the broadcast address) to get 253 usable addresses. That fits comfortably under the 254-address limit of 255.255.255.0, so that is your mask.

If you chose a smaller range — say, 192.168.1.0 to 192.168.1.127 — you have 127 total addresses, minus 2 = 125 usable. That fits under 255.255.255.128 (126 usable), so use that mask instead.

Understanding network address, broadcast address, and device addresses

In any IP range, the first address is reserved as the network address and the last is reserved as the broadcast address. Devices cannot use these addresses. If your range is 192.168.1.0 to 192.168.1.255, then 192.168.1.0 is the network address and 192.168.1.255 is the broadcast address. Devices get 192.168.1.1 through 192.168.1.254.

Your router typically takes 192.168.1.1. Your DHCP server (the part of the router that hands out addresses to devices) assigns the rest to computers, phones, and smart home devices as they connect. You can also manually assign addresses within the usable range if you want a device to always have the same IP.

How to enter the subnet mask into your router

Once you have chosen your mask, you enter it into your router's settings. Log into your router by opening a browser and typing 192.168.1.1 (or 192.168.0.1, depending on your router). You will be asked for a username and password — check the router's label or manual if you have not changed these.

Look for a section called Network Settings, LAN Settings, or DHCP. You should see fields for IP Address, Subnet Mask, and Gateway. Enter your chosen mask (255.255.255.0 for most home networks) in the Subnet Mask field. Save the changes. The router will restart, and devices will reconnect using the new settings.

If you are not comfortable entering router settings yourself, leave the defaults. Most routers ship with 255.255.255.0 already set, and that works for any home network.

When you might need a different mask

You need a smaller mask (like 255.255.255.128) only if you are deliberately splitting your network into two separate subnets — for example, one for work devices and one for guests, with a firewall between them. This is advanced and requires manual configuration on each device.

You need a larger mask (like 255.255.255.0 with a different third octet, such as 255.255.0.0) only if you are running more than 254 devices. A typical home network — even one with 50 smart devices, computers, and phones — never reaches that limit. If you think you might, stick with 255.255.255.0 and add a second router or access point instead of changing the mask.

Frequently Asked Questions

What does the /24 notation mean when I see it next to an IP address?

The /24 is shorthand for the subnet mask 255.255.255.0. The number refers to how many bits of the IP address belong to the network. 192.168.1.0/24 means "the 192.168.1 network with mask 255.255.255.0." You do not need to use this notation at home, but you will see it in router documentation and networking guides.

Can I change the subnet mask after devices are already connected?

Yes, but all devices will lose connection briefly while the router restarts. Devices will reconnect automatically once the router comes back up. If a device has a manually assigned IP address outside the new range, it will not reconnect until you update that address.

What if I want to use a different IP range, like 10.0.0.0 instead of 192.168.1.0?

You can use any private IP range: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, or 192.168.0.0 to 192.168.255.255. The subnet mask calculation stays the same. Most home routers default to 192.168.1.0, so stick with that unless you have a specific reason to change it.

Does the subnet mask affect internet speed or security?

The mask itself does not affect speed. It only determines which devices can talk to each other directly on your local network. Security comes from your router's firewall and Wi-Fi password, not the mask. Using a smaller mask (like 255.255.255.128) can add a layer of organization if you split your network into zones, but it requires additional configuration.