Stated rate = i , number of billing periods=n. Semiannual n=2, quarterly n=4 monthly n=12
daily n=365. If monthly with stated rate of 6%. Here i=0. 06 so n=12. Over the whole year, the actual interest rate is r = (1+ 0. 06/12)^(12) - 1. 100r = effectiveannualpercentrate. General formula is r = (1 + i/n)^(n)- 1 where i=statedrateasdecimal n=compound periods

Annual percentage rate is calculate in =PMT(rate,nper,pv,fv,type). for example (. 08/12,360,100000)
(. 08/12) means a monthly rate to find monthly payments. 360 means number of periods. 1,00,000 means present value.