• Resolved ita21

    (@ita21)


    Hello,

    I am using Calculated Fields Form on my website to build a loan calculator, its everything working fine beside the fact that if I want to calculate rates for 0% interest it doesn’t work, is there any way to fix this?

    Thanks

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

    (@codepeople)

    Hello @ita21

    Please, describe your equation and send me the link to your form.

    Best regards.

    Thread Starter ita21

    (@ita21)

    The equation is this:

    prec((fieldname2*fieldname7/1200*pow(1+fieldname7/1200,fieldname8)-fieldname7/1200)/(pow(1+fieldname7/1200,fieldname8)-1),2)

    I want the fieldname7 to accept also 0 as value,

    Plugin Author codepeople

    (@codepeople)

    Hello @ita21

    The value of the fieldname7 field cannot be zero because the equation’s component: (pow(1+fieldname7/1200,fieldname8)-1) would be equal to zero, and in mathematics, the division by zero is invalid.

    However, if the interest is zero, you would pay the principal only. So, if the principal in your form is the fieldname2 field, the equation would be similar to:

    
    PREC(IF(fieldname7, (fieldname2*fieldname7/1200*pow(1+fieldname7/1200,fieldname8)-fieldname7/1200)/(pow(1+fieldname7/1200,fieldname8)-1), fieldname2), 2)
    

    Best regards.

    Thread Starter ita21

    (@ita21)

    Thanks,

    Yes I understand this (would be equal to zero, and in mathematics, the division by zero is invalid) but can we make it to pay the principal divided by month for example if I take 10.000 $ with 0% and I choose to pay for 10 months to display as monthly rate result: 1000$

    Plugin Author codepeople

    (@codepeople)

    Hello @ita21

    In this case, if the number of months is the fieldname8, you should edit the equation I sent you previously as follows:

    
    PREC(IF(fieldname7, (fieldname2*fieldname7/1200*pow(1+fieldname7/1200,fieldname8)-fieldname7/1200)/(pow(1+fieldname7/1200,fieldname8)-1), fieldname2/fieldname8), 2)
    

    Best regards.

    Thread Starter ita21

    (@ita21)

    It worked,

    Thank you very much,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Loan Form Calculator’ is closed to new replies.