The subnet mask is already on your device — check your network settings to find it
Your subnet mask is stored in your device's network settings right now. It was assigned when you connected to the network and tells your device which part of an IP address belongs to the local network and which part identifies individual computers. You do not need to calculate it or look it up elsewhere. To find it, you check your network settings on Windows, Mac, or Linux, or you look at your router's admin page. The method depends on what device you are using and whether you want to see your own mask or someone else's.
If you know an IP address and want to guess what subnet mask it uses, you cannot do that reliably anymore. Modern networks use CIDR notation instead of address classes, which means any subnet mask can be paired with any IP address. The only way to know the actual mask is to check the device settings or ask the network administrator.
Key Takeaways
- Your subnet mask is stored in your device's network settings and can be found in Windows Network Settings, Mac System Preferences, or Linux terminal commands.
- On Windows, open Settings > Network & Internet > WiFi or Ethernet, select your connection, and look for "Subnet mask" in the IP settings section.
- On Mac, go to System Preferences > Network, select your connection, and click Advanced to see the subnet mask listed under TCP/IP.
- On Linux, type ip addr show or ifconfig in the terminal to see your subnet mask, often displayed as CIDR notation like /24.
- Your router's admin page shows the subnet mask for your entire network, accessible by typing your router's IP address into a web browser.
Finding your subnet mask on Windows
Open Settings and go to Network & Internet. If you are using WiFi, click WiFi and then select your network name. If you are using a wired connection, click Ethernet instead. You will see a list of networks you are connected to or have connected to before.
Click the network you are currently using. Scroll down and look for "IP settings" or "DNS settings." Click the word "Edit" next to IP assignment. A window will open showing your IP address, subnet mask, gateway, and DNS servers. The subnet mask appears as four numbers separated by periods, like 255.255.255.0. Write it down or take a screenshot if you need it later.
If you prefer the command line, open Command Prompt or PowerShell and type ipconfig, then press Enter. Look for the line that says "Subnet Mask" under your active network connection. This method works the same way on any version of Windows and shows the same information as the Settings window.
Finding your subnet mask on Mac
Click the Apple menu and select System Preferences (or System Settings on newer versions). Click Network. On the left side, select the connection you are using — either WiFi or Ethernet. Click the Advanced button in the lower right corner.
Click the TCP/IP tab at the top. Your subnet mask appears in the field labeled "Subnet Mask." It will look like 255.255.255.0 or another four-number pattern. If you are using an older Mac, the steps are the same but the menu names may say "System Preferences" instead of "System Settings."
From the terminal, you can also type ifconfig and press Enter. Look for the line that says "netmask" under your active connection. The mask will be shown in hexadecimal format (like 0xffffff00) or in standard notation depending on your Mac version. Both the graphical method and the terminal method show the same subnet mask.
Finding your subnet mask on Linux
Open a terminal window. Type ip addr show or ifconfig and press Enter. Both commands display your network connections and their settings. Look for your active connection — usually named eth0, wlan0, or ens0 — and find the line that shows your IP address and subnet mask together.
The subnet mask may appear as a slash followed by a number, like /24. This is called CIDR notation and represents the same information as 255.255.255.0. If you need the traditional four-number format, a /24 means 255.255.255.0, a /16 means 255.255.0.0, and a /8 means 255.0.0.0. Online CIDR converters can translate any number for you if you need the exact format for documentation or configuration files.
Understanding subnet mask classes and defaults
Older networks divided IP addresses into classes with default subnet masks. Class A addresses (1 to 126) used a default mask of 255.0.0.0, Class B addresses (128 to 191) used 255.255.0.0, and Class C addresses (192 to 223) used 255.255.255.0. However, most modern networks do not follow these defaults anymore because they are inflexible and waste address space.
Today, networks use CIDR notation instead, which allows any subnet mask to be paired with any IP address. Your network administrator chooses the mask based on how many devices need to be on the network, not based on the IP address class. This means you cannot reliably guess a subnet mask just from looking at an IP address — you need to check the actual device or network settings to know what mask is in use.
Checking your subnet mask on your router
Your router stores the subnet mask for your entire network. To see it, open a web browser and type your router's IP address into the address bar. This is usually 192.168.1.1 or 192.168.0.1, but check your router's label or manual if those do not work. You will be asked to log in with a username and password, usually printed on the router itself or in the manual.
Once logged in, look for a section called Network Settings, LAN Settings, or DHCP Settings. The subnet mask will be listed there along with other network information. This mask applies to all devices on your WiFi and wired network. If you change it, all devices will need to reconnect to the network, so only change it if you know what you are doing or if your network administrator tells you to.
Why you might need to know your subnet mask
Most of the time, your subnet mask is set automatically and you never need to think about it. You might need to find it if you are setting up a new device on your network, troubleshooting a connection problem, or configuring network software that asks for it. Some applications and network tools require you to enter your subnet mask manually to work correctly.
If you are connecting to a corporate or school network, the IT department may ask for your subnet mask when helping you troubleshoot. If you are setting up a home server or network printer, you may need to enter the subnet mask in the device's settings. In these cases, the subnet mask you find in your device settings is the correct one to use. Keep a record of it in case you need it again later.
Frequently Asked Questions
What does the subnet mask actually do?
The subnet mask tells your device which part of an IP address represents the local network and which part represents individual devices on that network. For example, with a mask of 255.255.255.0, the first three numbers of the IP address identify the network, and the last number identifies the device. This allows your device to know whether another device is on the same local network or on the internet.
Can I change my subnet mask?
Yes, but you should only do this if you know what you are doing or if your network administrator tells you to. Changing the subnet mask can disconnect all devices from the network until they reconnect. On your own home network, you can change it through your router settings, but on a work or school network, only IT staff should make this change.
What is the difference between a subnet mask and CIDR notation?
They represent the same information in different formats. A subnet mask like 255.255.255.0 is the traditional format. CIDR notation like /24 is shorter and means the same thing — the first 24 bits of the IP address identify the network. Both are correct; CIDR is just more compact and is used more often in modern networks.
Why do different networks have different subnet masks?
The subnet mask size depends on how many devices the network needs to support. A mask of 255.255.255.0 allows about 254 devices on the network. A mask of 255.255.0.0 allows about 65,000 devices. Network administrators choose the mask based on their needs, not based on the IP address itself.
Is my subnet mask the same on WiFi and Ethernet?
Usually yes, because both connections go through the same router and network. However, if you are connected to two different networks at the same time, each connection would have its own subnet mask. Check your network settings for each connection to see if they are different.