I am trying to build a finance calculator but I can't get the function correct.
At the moment I have:
function calculatepay() {
var months = $('#fin_months').val();
var amount = $('#fin_amount').val();
var deposit = $('#fin_deposit').val();
var result = Math.round((amount - deposit) / months).toFixed(2);
$('#fin_result').val(result);
$
}
It will calculate 1000 / 12 as 83.00 - it should be 83.33.
Can anyone help me figure it out