Loan simulator formula - Little error

Hi guys,

I am Vincent and I am coming from Belgium.
I use Gravity Forms and the Gravity FormsAdvanced Calculations to build my loan simulator.

I use this formula: A = P (r (1+r)^n) / ( (1+r)^n -1 ).

I take a real example.

Correct result:

Amount: 25 000 €
Duration : 60 months
Rate : 8.25%
Monthly payment: 506.35 €

False result with he formula:

Amount: 25 000 €
Duration : 60 months
Rate : 8.25%
Monthly payment: 509.91 €

I know that it’s only a difference of 3 euros but I can’t use the simulator because of this difference.

Can you help me?

@user666f1780acbcb745 what’s the exact calculation you have entered into your Gravity Forms Number field?

Presumably you are using merge tags to provide P, r, and n. What if you remove the merge tags and hardcode the values in the Number field calculation? Same result?

Hi,

I get the same result with hard code.

In order to get the good result for a rate at 8.25%, I have to put 7.9523 in the hidden field.

That’s really strange.

Hey Vincent,

This thread is a bit old, but I’m hoping that I can help other users experiencing the same issue :folded_hands:

Your formula is likely doing this:

r = (annual_rate / 100) / 12

In this scenario (aka nominal annual interest) with €25,000, 60 monthly payments, and 8.25% interest, the payment is approximately €509.91.

If the result you’re looking for is €506.35, the 8.25% needs to be treated as an effective annual rate instead. In that case, convert it to the equivalent monthly rate first:

r = (1 + 0.0825)^(1/12) - 1

This produces a payment of approximately €506.35 and can be rounded using round(), floor(), or ceil() depending on your preference.

For more details on to build a loan-payment formula in Gravity Forms, I actually published a guide that covers effective annual rates:

Let me know if you have any questions!