Hello friends!
I'm making myself an insulin sensitivity calculator.
500 divided by the daily insulin dose 28 = 17.86
I divide 17.86 by 12 and should get 1.49 (rounded) and get 1.42

Please tell me what's wrong ??

Here is the script.

$(function() {
$('input').keyup(function(){
updateTotal();
});
var updateTotal = function () {
var input2 = parseInt($('#tab_id2').val()) || null;
var total = (500 / input2).toFixed(2);
if (input2) {
$('#total_id_1').val(total);
};
var input1 = parseInt($('#total_id_1').val()) || null;
var total = (input1 / 12).toFixed(2);
if (input1) {
$('#total_id_2').val(total);
}
}
});