Calculating Subnets

Use this formula to calculate the number of subnets:

2^n (where n = the number of bits borrowed)

As shown in Figure 1, for the 192.168.1.0/25 example, the calculation looks like this:

2^1 = 2 subnets

Calculating Hosts

Use this formula to calculate the number of hosts per network:

2^n (where n = the number of bits remaining in the host field)

As shown in Figure 2, for the 192.168.1.0/25 example, the calculation looks like this:

2^7 = 128

Because hosts cannot use the network address or broadcast address from a subnet, 2 of these addresses are not valid for host assignment. This means that each of the subnets has 126 (128-2) valid host addresses.


So in this example, borrowing 1 host bit toward the network results in creating 2 subnets, and each subnet can have a total of 126 hosts assigned.