Subnet Masks Explained: What Is 255.255.255.0?
A subnet mask splits an IP address into network and host bits. What 255.255.255.0 means, how it maps to /24, and how to work out the usable host range.
ProfitTool Team
Security & Dev
What a Subnet Mask Is
A subnet mask is a 32-bit number that, when applied to an IP address using a bitwise AND operation, reveals the network address — the portion of the IP that identifies the network, as opposed to the individual host within that network.
The Binary Reality
IP address: 192.168.1.50 = 11000000.10101000.00000001.00110010
Subnet mask: 255.255.255.0 = 11111111.11111111.11111111.00000000
AND result: 192.168.1.0 = 11000000.10101000.00000001.00000000
(network address)The 1-bits in the mask identify the network portion. The 0-bits identify the host portion.
Common Subnet Masks
| Subnet Mask | CIDR | Usable Hosts | Typical Use |
|---|---|---|---|
| 255.255.255.0 | /24 | 254 | Small office / home network |
| 255.255.255.128 | /25 | 126 | Split a /24 in half |
| 255.255.255.192 | /26 | 62 | Small segment |
| 255.255.255.240 | /28 | 14 | Tiny segment / cloud subnet |
| 255.255.0.0 | /16 | 65,534 | Large network |
| 255.0.0.0 | /8 | 16,777,214 | Very large network |
Converting Between CIDR and Subnet Mask
The CIDR prefix (/24) is simply the count of consecutive 1-bits in the subnet mask:
- /24 = 24 ones = 11111111.11111111.11111111.00000000 = 255.255.255.0
- /25 = 25 ones = 11111111.11111111.11111111.10000000 = 255.255.255.128
- /28 = 28 ones = 11111111.11111111.11111111.11110000 = 255.255.255.240
Wildcard Mask
A wildcard mask is the bitwise inverse of the subnet mask. It is used in Cisco ACLs and firewall rules to specify which bits are "don't care":
- Subnet mask: 255.255.255.0 → Wildcard: 0.0.0.255
Why This Matters in Practice
Routers use subnet masks to determine whether a destination IP is on the local network (send directly) or needs to be sent to the default gateway (send to router). Network engineers use subnetting to partition large address spaces into logical segments for security, performance, and manageability.
Use our CIDR / Subnet Calculator to compute all subnet values instantly from any CIDR notation.
ProfitTool Team
Security & DevWritten and maintained by the ProfitTool team. Where an article references a ProfitTool utility, the behaviour described is the behaviour of the tool on this site — you can open it and check the output yourself.
More from the Knowledge Hub
CIDR Notation Explained: How IP Ranges and Subnets Work
CIDR notation writes an IP range as a prefix length. What /24 and /16 actually mean, how they map to subnet masks, and how to count the addresses in a block.
Developer ToolsHow DNS Lookup Works: A and AAAA Records Explained
When you type a domain into a browser, DNS translates it to an IP address. This guide explains how DNS resolution works and the difference between A and AAAA records.
Developer ToolsPrivate IP Address Ranges Explained: 10.x, 172.16.x and 192.168.x
Private IP addresses are ranges reserved for internal networks that are not routable on the public internet. This guide covers RFC 1918, why these ranges exist, and how NAT works with them.