Loan payment
FreeLogic@rabbinatix/loan-payment by Rabbinatixupdated Oct 4, 2026
The monthly payment of a loan: 10 000 at 6 % over 12 months is 860.66.
The annuity formula P × r / (1 − (1 + r)^−n) with the monthly rate r = yearly % / 1200. A 0 % loan is simply split evenly.
Shows: Power with a negative exponent, Divide, a Branch for the special case.
How to use it
Add it to your logic, then add a Call Function step in any logic and pick Loan payment. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.
Inputs
amount: Number
ratePercent: Number
months: Whole number
Outputs
monthly: Number
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 4 outputs. step 1 of 15
Loan payment
amount
ratePercent
months
Equals, Operators. 2 inputs, 1 output. step 2 of 15
==
A
B
result
Branch, Flow control. 2 inputs, 2 outputs. step 3 of 15
Branch
condition
True
False
Divide, Operators. 2 inputs, 1 output. step 4 of 15
/
A
B
result
Round, Math. 2 inputs, 1 output. step 5 of 15
Round
value
decimals
result
Return, Input / output. 2 inputs, 0 outputs. step 6 of 15
Return
monthly
Divide, Operators. 2 inputs, 1 output. step 7 of 15
/
A
B
result
Add, Operators. 2 inputs, 1 output. step 9 of 15
+
A
B
result
Subtract, Operators. 2 inputs, 1 output. step 10 of 15
-
A
B
result
Power, Math. 2 inputs, 1 output. step 11 of 15
Power
base
exponent
result
Subtract, Operators. 2 inputs, 1 output. step 12 of 15
-
A
B
result
Multiply, Operators. 2 inputs, 1 output. step 8 of 15
*
A
B
result
Divide, Operators. 2 inputs, 1 output. step 13 of 15
/
A
B
result
Round, Math. 2 inputs, 1 output. step 14 of 15
Round
value
decimals
result
Return, Input / output. 2 inputs, 0 outputs. step 15 of 15
Return
monthly
Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.
Examplesrun live against the logic · 2/2 pass
| Passed | Example | Input | Output |
|---|---|---|---|
| 6 % over a year | {"amount":10000,"ratePercent":6,"months":12} | {"monthly":860.66} | |
| Interest free | {"amount":1200,"ratePercent":0,"months":12} | {"monthly":100} |
Try it
Versions
In this package
Loan payment (entry)
