Updated 2023-12-11: Hosts calculation updated to support CIDR or 31 and 32.
Prerequisites:
- A1 contains an IP address, such as 10.0.0.2
- B1 contains the number of bits in the netmask (CIDR) such as 24
The below formulas then go into C1, D1 etc. to perform the various calculations. Some calculations depends on other calculations.