Calculation of compounding period (n)