What Is a Subnet Mask? A Plain-English Guide to 255.255.255.0, /24 and Friends

Illustration: a row of blue blocks followed by gray blocks
Contents
  1. What a Subnet Mask Does
  2. How to Read 255.255.255.0
  3. The Slash Notation: /24
  4. Common Subnet Masks
  5. How to Find Your Subnet Mask
  6. What a Wrong Subnet Mask Breaks
  7. Should You Change It?
  8. Frequently asked questions

Whenever you look at network settings, the subnet mask sits right under the IP address — almost always 255.255.255.0 on a home network. Most people never need to change it, but understanding it explains why devices can talk to each other, why the router’s address matters, and what goes wrong when a manual setting is off by one number.

What a Subnet Mask Does

An IP address has two parts: one identifies the network, the other the device (host) on that network. The subnet mask is what tells a device where the line between them is. Microsoft’s guide to TCP/IP addressing puts it simply: a subnet mask divides an IP address into the part that identifies the host and the part that identifies the network it belongs to.

Your device uses this to make one decision for every packet it sends:

  • If the destination is on the same network, send it directly — to the printer, the TV or another laptop at home.
  • If it is on another network — any address on the internet — send it to the default gateway, your router, which forwards it.

That is why IP address, subnet mask and default gateway always come together. Your router hands out all three automatically through DHCP.

How to Read 255.255.255.0

An IPv4 address is a 32-bit number, written as four numbers from 0 to 255, each standing for 8 bits. The mask is written the same way:

  • 255 means “this part is the network” (all 8 bits set).
  • 0 means “this part is the device” (no bits set).

With the address 192.168.1.23 and the mask 255.255.255.0:

1st2nd3rd4th
IP address192168123
Subnet mask2552552550
Meaningnetworknetworknetworkdevice

So the network is 192.168.1.x, and this device is number 23 on it. Every device whose address starts with 192.168.1 is on the same network and can be reached directly. The first address, 192.168.1.0, names the network itself, and the last, 192.168.1.255, is the broadcast address that reaches every device; neither can be given to a device. That leaves 1 to 254 — including the router, typically at 192.168.1.1. See our page on 192.168.1.1.

The Slash Notation: /24

You will also see masks written as a slash and a number, such as 192.168.1.0/24. This CIDR notation simply counts how many bits of the address belong to the network. 255.255.255.0 has three full blocks of 8 bits — 24 bits — so it is /24. The slash form is shorter and is what router settings, Android and many tools use.

Masks do not have to end at a block boundary. A /25 mask is 255.255.255.128, splitting the last block in two; a /23 is 255.255.254.0, combining two blocks. That is what “subnetting” means: cutting a network into smaller ones, or joining them into a bigger one.

Common Subnet Masks

MaskCIDRUsable addressesWhere you see it
255.0.0.0/816,777,214The 10.0.0.0 range in its full size
255.255.0.0/1665,534Large networks, some 172.16.x.x setups
255.255.254.0/23510Bigger home or office networks
255.255.255.0/24254Almost every home network
255.255.255.128/25126Splitting a /24 in half
255.255.255.252/302Point-to-point links, for example between a provider and a router

The number of usable addresses is 2 to the power of the device bits, minus two (the network and broadcast addresses). For /24 that is 2⁸ − 2 = 254.

Home networks use private address ranges reserved for this purpose: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. A router usually takes one /24 out of them, such as 192.168.0.0/24 or 10.0.0.0/24.

How to Find Your Subnet Mask

Windows: open Command Prompt and run ipconfig. The Subnet Mask line is under your Wi-Fi or Ethernet adapter.

Mac: System Settings → Network → your connection → Details → TCP/IP.

iPhone and iPad: Settings → Wi-Fi → tap the (i) next to your network; the subnet mask is listed under IPv4 address.

Android: Settings → Network & internet → Internet → tap your Wi-Fi network; some phones show the mask only as a prefix length or in the advanced details.

The router: the LAN settings show the router’s own address and the mask it uses for the whole network.

Our local IP address tool shows your device’s address on the network.

What a Wrong Subnet Mask Breaks

A wrong mask almost always comes from typing settings by hand. Microsoft’s troubleshooting notes describe the pattern: with an incorrect mask, a device misjudges which addresses are local, so communication fails to some hosts while others still work. On a home network that looks like this:

The mask is too small (for example 255.255.255.128 on a /24 network): the device thinks some neighbours are on another network and sends their traffic to the router instead. Some local devices become unreachable, while the internet may still work.

The mask is too big (for example 255.255.0.0 on a /24 network): the device thinks far-away addresses are local and tries to reach them directly, so they fail.

The gateway is outside the network the mask describes: the device cannot reach the router at all, and there is no internet.

The fix is simple: set the device to obtain its settings automatically, or copy the mask exactly from the router’s LAN settings. If you need a fixed address, use a reservation in the router instead; see what is a static IP address.

Should You Change It?

At home, rarely. 254 addresses are enough for most households, even with many smart devices. If you really run out, widening the router’s LAN to a /23 (255.255.254.0) doubles the space — change it in the router’s LAN settings, adjust the DHCP range, and restart devices so they pick up the new settings. If you only want a different address range, for example to avoid a clash with a provider gateway, change the router’s LAN address rather than the mask; see router not connecting to modem.

Frequently asked questions

What is the subnet mask for 192.168.1.1?

On home networks, almost always 255.255.255.0 (/24). The router at 192.168.1.1 then serves addresses from 192.168.1.2 to 192.168.1.254.

Is the subnet mask always 255.255.255.0?

On most home networks, yes, but not always. Larger networks and some provider setups use other masks; check the router’s LAN settings.

What does /24 mean?

That the first 24 bits of the address identify the network. It is the same as 255.255.255.0.

How many devices can a 255.255.255.0 network have?

254 addresses, one of which is usually the router.

Does the subnet mask affect internet speed?

No. It only decides which addresses a device treats as local. A wrong mask causes connection failures, not slowness.

Sources