A /24 subnet mask is 255.255.255.0. It marks the first 24 bits of an IPv4 address as the network part and the last 8 bits as the host part, giving one network 256 addresses, of which 254 are usable for devices. The first address names the network and the last is the broadcast address. Most home networks use a /24, such as 192.168.1.0/24, because 254 devices is plenty for a household or small office.
Key takeaways
- /24 means 255.255.255.0: 24 network bits, 8 host bits, 256 addresses and 254 usable hosts.
- A device uses the mask to decide whether another address is local or needs the gateway.
- Every extra bit halves the subnet: /25 has 126 usable hosts, /26 has 62, and /30 has just 2.
Open your Wi-Fi details and you will see three numbers together: an IP address like 192.168.1.10, a router address like 192.168.1.1, and between them a subnet mask of 255.255.255.0. That mask is the /24 — the most common subnet size in the world.
What is a /24 subnet mask?
A /24 subnet mask is 255.255.255.0. It tells every device that the first 24 bits of an IPv4 address identify the network, and the last 8 bits identify one device on that network. A /24 holds 256 addresses, of which 254 can be assigned to devices.
The two numbers in that sentence describe the same thing. The "/24" is CIDR notation: it counts the one-bits in the mask. The "255.255.255.0" is dotted-decimal notation: the same mask written as four numbers, like an IP address. You will meet both constantly, so it helps to read either one at a glance.
Take the address 192.168.1.10 with mask 255.255.255.0. The mask marks 192.168.1 as the network part — shared by every device on this network — and 10 as the host part, which identifies this one device. Every other device sharing the 192.168.1.x range is on the same local network; anything outside it must be reached through the gateway.
How does a subnet mask work?
A subnet mask works by telling a device which addresses are local and which need the router. Before sending anything, a device compares the destination address with its own, using the mask, and decides whether to send directly or hand the packet to the gateway.
The comparison uses a bitwise AND operation: a bit of the address survives only where the mask has a 1. For 192.168.1.10 with mask 255.255.255.0, the result is 192.168.1.0 — the network address. Any destination that gives the same result is on the same subnet; anything else goes to the default gateway, usually your router. TP-Link's subnet mask guide walks through the same decision with more examples.
This is why two devices can be on the same Wi-Fi and still fail to talk to each other: if their masks disagree about the network boundary, one of them sends its traffic to the gateway instead of directly. A wrong mask is a common cause of "connected but no internet" and "cannot see the printer" problems.
What does 255.255.255.0 look like in binary?
In binary, 255.255.255.0 is 11111111.11111111.11111111.00000000 — twenty-four 1s followed by eight 0s. Each 255 is one octet of eight ones, and each 0 is one octet of eight zeros, which is exactly why the mask is written as /24.
The rule is simple: where the mask has a 1, the matching bit of the address belongs to the network; where it has a 0, the bit belongs to the host. The ones are always contiguous from the left, which is why only nine numbers ever appear in a mask octet: 0, 128, 192, 224, 240, 248, 252, 254 and 255.
That rule is also why a mask like 255.255.255.100 is invalid — its binary form mixes ones and zeros instead of a clean run of ones followed by zeros. If you ever see a mask with an odd number in it, something is misconfigured.
How many hosts are in a /24?
A /24 has 256 addresses and 254 usable hosts. The 8 host bits give 2 to the power of 8, or 256, combinations — but two of them are reserved, so you get 254 addresses for actual devices.
The first address is the network address: for 192.168.1.0/24, that is 192.168.1.0, and it names the network itself. The last address is the broadcast address, 192.168.1.255, which reaches every device on the subnet at once. Neither can be assigned to a single device.
Usable addresses therefore run from 192.168.1.1 to 192.168.1.254. In practice the router takes one of them, usually 192.168.1.1, leaving 253 for your devices. That is still far more than most homes need, which is why /24 became the default.
| Prefix | Subnet mask | Total addresses | Usable hosts | Typical use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Huge enterprise or ISP networks |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large corporate networks |
| /24 | 255.255.255.0 | 256 | 254 | Home and small office networks |
| /25 | 255.255.255.128 | 128 | 126 | splitting a /24 in two |
| /26 | 255.255.255.192 | 64 | 62 | Small department or guest network |
| /27 | 255.255.255.224 | 32 | 30 | Small isolated group of devices |
| /28 | 255.255.255.240 | 16 | 14 | Point-of-sale or IoT segment |
| /29 | 255.255.255.248 | 8 | 6 | Tiny segment, e.g. a printer group |
| /30 | 255.255.255.252 | 4 | 2 | Router-to-router link |
What is CIDR notation, and where did /24 come from?
CIDR, or Classless Inter-Domain Routing, is the system that replaced the old class A, B and C network sizes in 1993. Defined in RFC 4632, it writes an address and its mask together as one value, such as 192.168.1.0/24, where the number after the slash counts the network bits.
Before CIDR, networks came in fixed sizes: class A gave 16 million hosts, class B gave 65,534, and class C gave 254. That was wasteful — a company needing 300 addresses had to take a whole class B. CIDR lets you choose any prefix length, so a network can be exactly the size you need, as ShowMyIP's subnetting explainer shows with its cheat sheet of common prefixes.
The /24 survived because it matches the old class C size, which happened to be right for most small networks. When you see 192.168.1.0/24 today, you are looking at a CIDR prefix that kept the most useful legacy size.
How do you calculate a /24 subnet? A worked example
Calculating a /24 is straightforward once you know the three steps: AND the address with the mask to get the network address, set every host bit to 1 to get the broadcast address, and count the host bits to get the size. Here it is with 192.168.1.37/24.
- Write the address in binary. 192 is 11000000, 168 is 10101000, 1 is 00000001 and 37 is 00100101.
- Write the mask under it. 24 ones, then 8 zeros: 11111111.11111111.11111111.00000000.
- AND the two lines. Where the mask has a 1, keep the address bit; where it has a 0, clear it. The result is 11000000.10101000.00000001.00000000, or 192.168.1.0 — the network address.
- Find the broadcast address. Set all 8 host bits to 1: 192.168.1.255.
- Count the hosts. 2 to the power of 8 is 256 addresses, minus the network and broadcast addresses, gives 254 usable hosts: 192.168.1.1 to 192.168.1.254.
You rarely need to do this by hand — your router and DHCP server handle it — but knowing the method helps you spot a misconfigured mask or work out whether two devices are really on the same network. You can confirm your own address and mask with our free what is my IP checker.
When should you use a /24, and when should you split it?
Use a /24 when you have fewer than 254 devices and want a simple network: most homes, small offices and guest Wi-Fi setups fit comfortably. One flat /24 is easy to manage, and every device can reach every other device directly.
Split it when you need isolation. A common small-business setup uses one /24 for staff, a separate /25 or /26 for guests, and another small subnet for point-of-sale or IoT devices. That way a compromised smart TV or a guest's infected laptop cannot reach your payment terminal or file server directly.
Subnetting works alongside VLANs for this job: the VLAN separates the traffic at the switch, and the subnet gives each group its own address range. Together they are the simplest form of network segmentation, and they are worth doing as soon as you have devices you do not fully trust on the same network as devices you do.
What are the common mistakes with /24 subnets?
The most common mistake is using the wrong mask on one device. A laptop set to 255.255.0.0 while everything else uses 255.255.255.0 will think devices on other floors are local, and will fail to reach them properly. Check the mask whenever a device can reach the internet but not local resources, or vice versa.
Another mistake is assuming 256 devices fit in a /24. They do not — 254 is the real limit, and the router takes one. If you are approaching 200 devices, plan a second subnet or a larger prefix before DHCP runs out of addresses.
A third mistake is putting everything on one flat /24 for convenience, including IoT gadgets and guest devices. Convenience is the enemy here: a single compromised camera can scan all 254 addresses in seconds. Segment anything you would not trust with your files.
Finally, do not confuse the mask with the gateway. The mask defines the network boundary; the gateway is the router address that traffic crosses to leave the network. Both appear in your network settings, but they do different jobs — and if you need to check your public-facing setup, our DNS lookup tool shows how your domain resolves from the outside.
How do you find your own subnet mask?
On Windows, open Command Prompt and run ipconfig, then look for Subnet Mask under your active adapter. On macOS, open System Settings, choose Network, select your connection and open Details. On Linux, run ip addr and look for the prefix after your address, such as /24.
On a phone, open your Wi-Fi settings, tap the connected network, and look for the subnet mask or IP settings entry. Most home routers hand out 255.255.255.0 by default through DHCP, the service that assigns network settings automatically — so if you see /24, your network is set up the standard way.
If you see something else, such as 255.255.255.128 (/25) or 255.255.0.0 (/16), your network was deliberately configured that way, or by an ISP router with different defaults. It is not wrong by itself — but now you know how to read what it means.
The bottom line
A /24 is 255.255.255.0: 24 bits for the network, 8 bits for hosts, 256 addresses and 254 usable devices. It is the default for home and small office networks because it is simple, standard, and big enough for almost any household.
Understanding it pays off whenever a device cannot see the network, or when you start segmenting guests and IoT gadgets away from your main devices. Check your own setup with our free what is my IP tool and compare what your router hands out with the /24 pattern above.
Frequently asked questions
What is a /24 subnet mask?
A /24 subnet mask is 255.255.255.0. The /24 means the first 24 bits of the IPv4 address identify the network, and the remaining 8 bits identify individual devices on that network. It is the most common mask on home and small office networks.
How many hosts does a /24 have?
A /24 has 256 addresses in total and 254 usable hosts. The first address is the network address and the last is the broadcast address, so neither can be assigned to a device. For example, 192.168.1.0/24 gives usable addresses from 192.168.1.1 to 192.168.1.254.
What is the difference between 255.255.255.0 and /24?
There is no difference — they describe the same mask in two notations. 255.255.255.0 is dotted-decimal notation, and /24 is CIDR notation, which simply counts the 24 one-bits in the mask. An address written as 192.168.1.10 with mask 255.255.255.0 is the same as 192.168.1.10/24.
What is the broadcast address of a /24?
The broadcast address is the last address in the range, with all host bits set to 1. For 192.168.1.0/24 it is 192.168.1.255. A packet sent to the broadcast address reaches every device on that subnet at once.
How do I find my subnet mask?
On Windows, run ipconfig in Command Prompt and look for Subnet Mask under your network adapter. On macOS, check System Settings, then Network, then your connection details. On Linux, run ip addr. On a phone, look in the Wi-Fi connection details. Most home networks show 255.255.255.0.
When should I use a /24 instead of a bigger subnet?
Use a /24 when you have fewer than 254 devices and want a simple, standard network, which covers most homes and small offices. Use a larger subnet such as /16 only when you genuinely need thousands of addresses, and use smaller subnets such as /25 or /26 when you want to split a network into isolated groups for security.
What is a subnet mask in simple terms?
A subnet mask is the rule that splits an IP address into two parts: the network part shared by every device on the same local network, and the host part that identifies one specific device. Think of it like a street name and a house number — the mask marks where one ends and the other begins.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against RFC 4632 (CIDR) and standard subnetting references from TP-Link and Microsoft's TCP/IP guide.
How we write and fact-check →