So, I've been trying to translate the attached formula into javascript, and I can't seem to get it right.
I have:
R = (Math.pow(FV/PV,1/years)-1);
which doesn't equate things properly.
The final formula at the bottom is what I need.
Help will be rewarded!