frequency equal to the payments frequency, the result is the same as
the "quoted rate frequency"...quite a mouthful, I know!
EXAMPLE: on a monthly payment loan, if the rate is quoted as 12% compounded
semiannually, then a rate compounded monthly needs to be calculated in order to
make it "fit" the formula.
Using g as the quoted annual rate compounding semiannually and h as the "monthly" rate:
(1 + h/12)^12 = (1 + g/2)^2 ; do the math to get:
h = 12[(1 + g/2)^(1/6) - 1]
With g = 12% : h = 12[(1 + .12/2)^(1/6) - 1] = .1171055... (or 11.71%).
In other words, charging interest 12 times per year at 11.71% is the same
as charging interest 2 times per year at 12%.
With your formula, I suggest you replace (g-i) with k,
where k = h - i and h = as above.
Treat the initial investment (call it A) separately:
A(1 + k/12)^(fn)
Hope I was clear enough; not too easy to explain without chalkboard