You use a CIDR/subnet calculator. It's FAR more important to explain the basics of how the various networks communicate: what a "route" is, how it works, what DNS does, what ports are and how they are ...