To calculate your earnings from a CD, you'll need to  use the following formula: A = P(1+R/N)(NT). Where 'A' represents the value of your CD, including interest. 'P' is equal to your principal balance or initial deposit. 'R' represents your yearly interest rate, in this case it would be your APY. 'N' represents the compound frequency of your CD in a given year, and 'T' represents the number of years until your CD's maturity date.