Hi @Corissandageri
It took me a while to figure that out - there's actually a bug with that code sample!
The Years assignment at the top should be YearsSlider.Value. The original code causes a divide by zero error.
The following should hopefully work for you.
With( { AnnualRate: RateSlider/8/100, // slider moves in 1/8th increments and convert to decimal
Amount: AmountSlider*10000, // slider moves by 10,000 increment
Years: YearsSlider.Value, // slider moves in single year increments, no adjustment required
AnnualPayments: 12 }, // number of payments per year
With( { r: AnnualRate/AnnualPayments, // interest rate
P: Amount, // loan amount
n: Years*AnnualPayments }, // number of payments
r*P / (1 - (1+r)^-n) // standard interest calculation
)
)