Amount of savings = Principal originally invested * (1 + decimal annualized rate of interest / number of compounding periods per year)^{times per year interest is compounded * years invested}

Interest Earned

Then to figure out the interest earnings you would subtract the original principal from the result.