# How to Calculate Subnet Bits

Techwalla may earn compensation through affiliate links in this story.

An Internet protocol (IPv4) address consists of 32 bits, separated into four 8-bit binary words. When calculating subnet bits, you are attempting to determine the number of hosts available in a subnet based upon the subnet mask. This mask, or the mask bits, display how many hosts are available in the binary IP address. For example, a 24-bit mask leaves 255 hosts open since 24 bits out of the maximum 32 bits leaves an 8-bit binary word, which, when converted to decimal, has a maximum value of 255. Grasping subnet bits can be difficult without an understanding of binary, but it is possible with some effort.

Video of the Day

## Step 2

Convert the subnet mask into binary. Use an online calculator if you need to (see Resources). A subnet mask of 255.255.255.0 will be 11111111.11111111.11111111.00000000 in binary. If you count the ones you will see that there are 24. This makes the mask bits 24. You can refer to your network as 192.168.0.1/24 with this schema.