APR to APY calculator

APY = (1 + APR/n)^n − 1 where n is compounding periods per year.