Online Subnet Mask Conversion and Network Calculation Tool

This is an online tool for network calculation and subnet mask conversion, providing calculation and conversion functions for IP addresses, subnet masks, network nodes, etc., and comes with a detailed explanation of subnet mask calculation. It is very convenient and practical, and is provided free of charge to friends in need.


Subnet Mask Calculator
Enter the TCP/IP network address:
Forced conversion to: Default Class A Class B Class C
Enter the number of subnets required:
Or enter the number of nodes/hosts per subnet:         
Results of subnet mask calculation:
Network type:
Subnet mask: or
Number of subnets:                  
Number of nodes/hosts per network:
Description: It is possible to convert IP addresses represented in decimal, binary, and hexadecimal. Enter one and click the calculate button next to it.

Subnet Mask Converter
Please enter the dotted decimal subnet mask
Or enter the number of bits of the subnet mask /
Description: It is possible to convert between the decimal representation of the subnet mask and the number of bits in the subnet mask. Enter one and click the calculate button next to it.
Concept of Subnet Mask:
A subnet mask is a 32-bit address used to mask part of the IP address to distinguish between the network identifier and the host identifier, and to indicate whether the IP address is on a local network or a remote network.   
Determining the number of subnet masks: The number of bits used for the subnet mask depends on the possible number of subnets and the number of hosts in each subnet. Before defining the subnet mask, it is necessary to understand the original number of subnets and the number of hosts.    The steps for defining the subnet mask are:
A. Determine which group of addresses we will use. For example, if we are assigned the network number "210.73.a.b", this network address is a Class C IP address, with the network identifier being "210.73" and the host identifier being "a.b".   
B. Based on the number of subnets we currently need and the number of subnets we may expand to in the future, use some bits of the host to define the subnet mask. For example, if we currently need 12 subnets and may need 16 in the future, use the first four bits of the third byte to define the subnet mask. Set the first four bits to "1", that is, the third byte is "11110000", which we will temporarily call the new binary subnet mask.    
C. Set all bits corresponding to the initial network to "1", that is, set the first two bytes to "1", and the fourth byte to "", then the dotted binary form of the subnet mask is: "11111111.11111111.11110000.00000000"   
D. Convert this number to the dotted decimal form as: "255.255.240."   This number is the subnet mask of the network.