How to Calculate the Number of Hosts Available
To determine the number of hosts available in a subnet, use this formula: (2^Z)-2
(where "Z" equals the number of zeroes in the binary version of the subnet address)
e.g. 255.224.0.0 = 11111111.11100000.00000000.00000000  - 21 zeroes -   (2^21)-2 = 2,097,150
e.g. 255.255.224.0 = 11111111.11111111.11100000.00000000  - 13 zeroes -   (2^13)-2 = 8,190
e.g. 255.255.255.0 = 11111111.11111111.11111111.00000000  - 8 zeroes -   (2^8)-2 = 254
e.g. 255.255.128.0 = 11111111.11111111.10000000.00000000  - 15 zeroes -   (2^15)-2 = 32,766