Somewhere in your device’s network settings, alongside your IP address, sits a value most people never think about until something stops connecting properly: the subnet mask. It’s not something you’ll usually need to touch, but knowing how to find it — and understanding what it actually tells you — comes in handy for troubleshooting, setting up new hardware, or just making sense of your network. This guide explains what a subnet mask actually is and why it matters, then walks through exactly how to find it on Windows, macOS, iPhone, and Android, and finally covers why a public IP lookup tool can’t show it to you and how to calculate it yourself when needed.
Table of Contents
What a Subnet Mask Is and Why You Need It
Before hunting it down on your specific device, it helps to understand what a subnet mask actually does and why it exists alongside your IP address in the first place.
- An IP address alone doesn’t tell a device everything it needs to know. Your IP address (like
192.168.1.15) identifies your device on a network, but on its own, it doesn’t indicate which part of that network is “local” to you and which part requires being routed elsewhere. - The subnet mask defines the boundary of your local network. A subnet mask like
255.255.255.0tells your device that the first three numbers of its IP address (192.168.1) represent the network portion, while the last number represents the specific device (host) on that network — everything sharing that same network portion is considered local. - This is different from your default gateway. Your default gateway (commonly something like
192.168.1.1) is the specific address of the router your device sends traffic to when the destination isn’t local, based on the subnet mask’s calculation — the subnet mask determines whether a destination is local, and the gateway is where non-local traffic gets sent. - Standard subnet mask values follow a predictable pattern.
255.255.255.0is by far the most common on home networks, indicating 254 usable addresses on that local network. Other values like255.255.0.0or255.0.0.0indicate progressively larger networks, each following the same underlying logic of marking network bits versus host bits. - Why you’d actually need to know it. Common reasons include manually configuring a static IP address on a device, setting up port forwarding or a local server, troubleshooting why two devices on the same network can’t communicate, or configuring advanced router or firewall settings that require matching your network’s exact addressing scheme.
With that foundation in place, here’s exactly where to look to find this value on the device you’re actually using.
How to Find Your Subnet Mask on Windows
Windows makes the subnet mask visible through both a quick Command Prompt check and the graphical network settings.
Using Command Prompt:
- Press the Windows key, type
cmd, and open Command Prompt. - Type
ipconfigand press Enter. - Look under your active network adapter (labeled “Wireless LAN adapter Wi-Fi” or “Ethernet adapter Ethernet”) for the line labeled Subnet Mask — it will typically read something like
255.255.255.0.
Using Settings (Windows 10 and 11):
- Open Settings > Network & Internet.
- Click Wi-Fi or Ethernet, depending on your connection type, then click on your active network.
- Scroll down to the Properties section and look for IPv4 subnet mask (Windows 11) or open View your network properties to find the same value (Windows 10).
Both methods return the same value — the Command Prompt method is generally faster if you’re already comfortable with basic commands, while the Settings method is more approachable if you’d rather avoid the command line entirely.
How to Find Your Subnet Mask on Mac
macOS provides the subnet mask through both System Settings and a quick Terminal command.
Using System Settings:
- Click the Apple menu and open System Settings.
- Click Network in the sidebar, then select your active connection (Wi-Fi or Ethernet).
- Click Details (or the (i) info icon, depending on your macOS version), then go to the TCP/IP tab.
- The Subnet Mask field is listed directly alongside your IP address and router information.
Using Terminal:
- Open Terminal via Spotlight search or from Applications > Utilities.
- Run the following command, adjusting the interface name if needed (
en0is commonly Wi-Fi on many Macs):
ifconfig en0- Look for the line beginning with
inet, followed by your IP address and anetmaskvalue shown in hexadecimal (for example,0xffffff00, which corresponds to255.255.255.0).
The Terminal method displays the subnet mask in hexadecimal rather than the standard dotted-decimal format shown in System Settings, so if you’re not used to converting between the two, the graphical method is generally the more immediately readable option.
How to Find Your Subnet Mask on iPhone and Android
Mobile operating systems display the subnet mask within the detailed Wi-Fi connection settings, though it’s tucked a bit further into the menus than on desktop platforms.
On iPhone (iOS):
- Open Settings > Wi-Fi.
- Tap the (i) info icon next to your currently connected network.
- Scroll down to the IPv4 Address section, where the Subnet Mask is listed directly alongside your device’s IP address and router address.
On Android:
- Open Settings > Network & Internet > Wi-Fi (menu naming may vary slightly by manufacturer).
- Tap the gear icon next to your connected network, or tap the network name directly.
- Tap Advanced or View more if the details aren’t immediately visible.
- Look for Subnet Mask listed under the IP configuration details, alongside your IP address and gateway.
On both platforms, this information is only available for Wi-Fi connections you’re actively connected to — there’s no equivalent menu for viewing subnet mask details over a cellular data connection, since that addressing is managed entirely by the carrier rather than exposed in device settings.
Why Can’t I Find My Subnet Mask With an Online IP Lookup Tool?
After checking your own device, it’s natural to wonder whether a quick web search or public “what’s my IP” tool could show the same information — but this is where local and public networking information diverge.
Why doesn’t a “what’s my IP” website show my subnet mask? These tools only see the public IP address your router presents to the internet — they have no visibility into your private local network at all, including your subnet mask, which as covered earlier exists specifically to define your local network’s boundaries. Your subnet mask is a purely local configuration value, stored only on your own devices and router, and it’s never transmitted out to the public internet.
Can I find my router’s subnet mask the same way I find my device’s? Yes, but not through a public tool — you’d log into your router’s admin dashboard directly (typically by entering its local IP address, like 192.168.1.1, into a browser) and check the LAN or network status page, which mirrors the same information covered in the device-specific guides above but from the router’s own perspective.
How do I calculate a subnet mask if I only know an IP range or CIDR notation? If you know a network’s CIDR prefix (such as /24), the subnet mask follows directly: the prefix number represents how many bits are set to 1, starting from the left. A /24 sets the first 24 bits to 1, resulting in 255.255.255.0; a /16 sets the first 16 bits to 1, resulting in 255.255.0.0. For less common prefixes, an online CIDR-to-subnet-mask converter or a manual binary-to-decimal conversion will give you the exact value.
What if I need to calculate a subnet mask from a given IP address range instead of a CIDR prefix? Determine how many total addresses the range spans, round up to the next power of two if it isn’t one already, and match that count to its corresponding subnet mask — for example, a range spanning up to 64 addresses corresponds to a /26 subnet mask (255.255.255.192). Most online subnet calculators handle this conversion automatically if you’d rather not do the binary math by hand.
Whether you’re checking it directly on your device using the steps above, looking it up on your router, or calculating it manually from a CIDR prefix or address range, the subnet mask is always a local, device-side value — never something a public internet-facing tool will be able to show you.
Between understanding what the subnet mask actually does, knowing exactly where to find it on Windows, Mac, iPhone, and Android, and understanding why it stays invisible to public IP tools while remaining easy to calculate yourself, you should now be able to track this value down on virtually any device you’re using.











Comments