How to Calculate Host ID

By Jedadiah Casey

Within an Internet Protocol or IP network, every connected host must have both an IP host address and a subnet mask to operate properly. Any device using the IP protocol can refer to itself with the IP address and subnet mask, but to communicate with other devices on the network, each device must have either a private or public IP address and subnet mask. The host ID is calculated by using the remainder of the subnet mask as it applies to the computer's IP address.

Obtain the subnet mask of the device. For example, on a Windows computer, open a command prompt and type "ipconfig" and press the "Enter" key. The most common subnet mask is

View the device's IP address. On a Windows computer, the "ipconfig" command also reveals the IP address.

Calculate the host ID based on the subnet mask. For example, with an IP address of and a subnet mask of, the network ID is and the host ID is 34. With an IP of and a subnet mask of, the network ID is 10 and the host ID is 23.65.21.