AT&T Interview Question

What is the formula to calculate subnets?