This tool can be used to calculate your subnets in a fast and easy way. You can also use some pre-defined templates.
To learn more about networking and subnetting, read this page.