Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    Have you checked the sample “Lease Calculator” included with the plugin? It’s very similar to the formula you are looking for (may require an additional calculation).

    That sample is also explained in the page http://wordpress.dwbooster.com/forms/calculated-fields-form under the “equations” tab.

    Thank you!

    Thread Starter sallam

    (@sallam)

    I’ve used this equation but it doesn’t work:

    prec(CALCULATEMONTHS(fieldname1, fieldname2, fieldname3),2)

    for: amount, interest rate (percent), payment

    Plugin Author codepeople

    (@codepeople)

    Hi,

    The built-in function CALCULATEMONTHS(x,y,z) isn’t available in the current free version listed at this directory. It is part of the “Financial Module” that was recently added to the “Developer Version”.

    The code of that function is the following:

    function CALCULATEMONTHS(finAmount, finInterest, finPayment){
    			var result = 0;
    
    			if(finInterest == 0){
    				result = Math.ceil(finAmount / finPayment);
    			}
    			else{
    				result = Math.round(( (-1/12) * (Math.log(1-(finAmount/finPayment)*((finInterest/100)/12))) / Math.log(1+((finInterest/100)/12)) )*12);
    			}
    
    			return result;
    		};

    Try adding the code to your page or to the calculated field, so you can use it.

    However please note that the full set of financials functions can be accessed only through the “Developer” (commercial) version at the present moment.

    Hope that helps. Sorry for the inconvenience.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘compound interest equation needed’ is closed to new replies.