What is a subnet mask, and how to find it?

Ruth C. | December 23, 2020

A subnet mask resembles an ordinary Internet Protocol address, consisting of 32 bits separated into four octets. Another way of depicting these so-called masks is by referring to their structure. 

It is a string of ones followed by zeros in binary. In the simplest sense, a subnet mask reveals the range of available IP addresses. 

The mask shows the exact number of devices that can connect depending on the set rules. 

What is a subnet? 

A subnet represents smaller networks inside a larger network. Typically, people split them by using the IP address and subnet mask. 

Network segmentation works as a solution to commonplace networking hurdles. For example, if criminals compromise one subnetwork, others remain safe from unauthorized access. 

Furthermore, separated local networks are less likely to show signs of severe congestion. After dividing a network, subnets will handle fewer hosts. Hence, this split minimizes local traffic that a single network has to manage. 

However, network segmentation should prioritize the usage criteria. In other words, the generated subnets should connect hosts with similar purposes. 

Example of subnetworks at home

To illustrate this rule, let’s examine a relatively simple subnetwork collection. Users divide networks according to their purpose. One subnet could serve guests exclusively. Another could accept connections from smart home gadgets. 

The final subnet could take care of computers and smartphones. In a way, this relates to a simple load balancing: distributing tasks to separate entities. 

Difference in IPv6 and IPv4 addresses

IPv6 and IPv4 networks differently distinguish subnet masks. In IPv6 networks, they are prefix length, commonly known as a prefix. 

For instance, here is how a prefix length looks for 65 subnetworks: 


Understanding subnet masks 

Default subnet masks follow a similar structure as regular IP addresses. The latter contains two components:

  • Network ID, which uniquely identifies the network segment. 
  • Host ID, which relates to the individual connected devices. 

In a sense, a subnet mask conceals the network portion of the address, preserving only the host address. Its primary purpose is to define the exact number of IP addresses available within the network. 

For example, if a subnet mask indicates 256 available IP addresses, devices beyond that number will not connect. 

The odds are most networks have a subnet mask In this case, we take a look at the first three octets (or the network prefix) that cannot variate. 

Only “0” can be anything from 0 to roughly 256. By manipulating the octets, we can increase or decrease the number of available IP addresses.

Example of subnet masks

For example, will supply approximately 65,536 unique IP addresses, creating a Class B network. If we take things further and use a subnet mask of, we would craft a Class A network, facilitating over 16 million hosts. 

IP addresses and subnet masks are initially binary bits, but they are simpler when expressed in dot decimal. We can quickly turn the subnet mask into their binary form: 

  • = 11111111.11111111.11111111.00000000
  • = 11111111.11111111.00000000.00000000
  • = 11111111.11111111.1111111.10000000. In this case, only 128 IP addresses are available. 

Usually, a network won’t have exactly 128 or 256 usable IP addresses. The first IP address is generally for the network subnet identifier. Additionally, there is a second reserved address referred to as the network broadcast address

Subnet mask cheat sheet

Here is a simple cheat sheet for calculating subnet masks:

AddressesHostsNetmaskAmount of a Class C
/ 3042255.255.255.2521 / 64
/ 2986255.255.255.2481 / 32
/ 281614255.255.255.2401 / 16
/ 273230255.255.255.2241 / 8
/ 266462255.255.255.1921 / 4
/ 25128126255.255.255.1281 / 2
/ 24256254255.255.255.01
/ 23512510255.255.254.02
/ 2210241022255.255.252.04
/ 2120482046255.255.248.08
/ 2040964094255.255.240.016
/ 1981928190255.255.224.032
/ 181638416382255.255.192.064
/ 173276832766255.255.128.0128
/ 166553665534255.255.0.0256

How to find the subnet mask in your device?

A subnet mask will help you determine the number of devices that can connect to your network.


  1. Open the Control Panel and select Network and Sharing Center.

Find subnet mask on Windows by opening Control Panel.

  1. Select your network name (next to Wi-Fi).

Find subnet mask on Windows by clicking your network name.

  1. Click on Details.

Find subnet mask on Windows in Wi-Fi within Network and Sharing Center.

  1. Your IP address and subnet mask will be visible in this window.

Find subnet mask on Windows in the details about your network.


  1. Navigate to System Preferences and pick Network.
  2. Opt for the Advanced option to see more settings.

Find subnet mask on MacOs by opening System Preferences and Network.

  1. Click on the TCP/IP tab, and you will see both your IP address and the applied subnet mask.

Find subnet mask on MacOs within the TCP/IP tab.

  1. An alternative is to open Terminal and type “ipconfig.” Press enter, and among the presented information, you will find the same information.


  1. Move to Settings and find the Wi-Fi section.

Find subnet mask on iOS by opening Settings and Wi-Fi.

  1. Look for your network and click on the “i” icon.

Find subnet mask on iOS by opening your Wi-Fi network.

  1. You will see all network-related details, including the subnet mask.

Find subnet mask on iOS by opening your Wi-Fi details.


  1. Navigate to Settings, and select the Wi-Fi & network section.

Find subnet mask on Android by opening Wi-Fi & network section.

  1. Click on your network name in the Wi-Fi section.

Find subnet mask on Android by clicking on your network name.

  1. Choose Advanced.

Find subnet mask on Android by choosing Advanced section.

  1. All the network details will be visible to you.

Find subnet mask on Android by reviewing the network details.

Final words

Understanding the subnet mask principle is highly convenient. You can quickly learn the number of IP addresses available on your network. 

Furthermore, you can determine the number of subnets as well. For instance, if you have a subnet mask, you get 1 subnet. 

However, this number shifts according to the subnet number of bits in the mask. If we consider (11111111.11111111.11111110.00000000) as our new subnet mask, we get more networks but fewer hosts. 

In the latter mask, the network number is 128, and they have only 510 available IP addresses. 

Overall, managing your network is a huge plus. You can enhance its security and ensure smooth performance. 

Protect your IP address and location details

However, your IP address is not always safe: many online entities need it to track you. When entering the digital world, you reveal personal data, starting with your location. 

Hence, online services, hackers, government agencies, and marketers can always determine your approximate location. 

Fortunately, this does not have to be the case for you. A VPN helps you pick a location you present across the digital landscape. 

Atlas VPN offers a range of servers, all pinpointing to different regions. Such spoofing can assist in accessing geo-blocked content and concealing your online activities from your ISP. 

So, get a VPN to take care of your digital privacy even when you connect to unsecured Wi-Fi.

Browse safely & anonymously with a VPN

Browse safely & anonymously with a VPN

Encrypt your internet traffic and defend against online snooping, hackers, governments, or ISPs.
Ruth C.

Ruth C.

Cybersecurity Researcher and Publisher at Atlas VPN. Interested in cybercrime, online security, and privacy-related topics.



Frequently asked questions

© 2023 Atlas VPN. All rights reserved.