How is the Annual Percentage Yield (APY) calculated?

Updated