How to Calculate a Subnet Address

By Contributing Writer

An IP address is a 32-bit binary numeric code written in the decimal-dot form that contains network and host parts. The host bits define a computer, while the network prefix determines a network. Subnetting organizes a large network by breaking it into several subnets. To define such subnets, bits are taken from the host portion of IP address, hence extending the network prefix (see Figure). Each network has a subnet mask that explicitly defines host and network bits as "0" and "1" respectively. As an example, you can calculate the subnet address of a computer that has IP address 192.35.128.93 and the subnet mask of this network is 255.255.255.224.

Calculating Subnet IP Address

Step 1

Work through Section 2 to obtain the computer IP address in the binary form. In our example, IP 192.35.128.93 converts to 11000000.00100011.10000000.01011101.

Step 2

Complete Section 2 to obtain the subnet mask in the binary form. In our example, the binary form of the subnet mask 255.255.255.224 is 11111111.11111111.11111111.11100000.

Step 3

Line up the binary forms of the computer IP and the subnet mask. In the computer IP, substitute all bits with "0," if there are "0" in the corresponding positions in the subnet mask. In our example,the last five bits of the subnet mask are "0" hence the last five bits in the computer IP has to be "0" to calculate the subnet IP. 11000000.00100011.10000000.01011101 ---> IP address11111111.11111111.11111111.11100000 ---> Subnet mask----------------------------------------------------------11000000.00100011.10000000.01000000 ---> Subnet IP address

Step 4

Work through Section 3 to get the subnet IP in the decimal-dot form using its binary form (Step 3). In our example, the subnet IP would be 192.35.128.64.

Getting the Binary IP from the Decimal-dot IP

Step 1

Browse to the IP Converter using the link in Resources.

Step 2

Type the IP address in the text field "Enter IP address" and click "Submit."

Step 3

Read the binary IP address in the string "Binary Conversion."

Getting the Decimal-dot IP from the Binary IP

Step 1

Browse to the IP Converter using the link in Resources.

Step 2

Type the binary IP address in the text field "Enter Binary Address" and click "Submit."

Step 3

Read an IP address in the decimal-dot form in the string "IPv4 Conversion."