Thanks Philip M for further explaining the toFixed().

If my function that performs the calculation is this:

Code:

<script type="text/javascript">
function updatesum() {
document.PaymentForm.newbalance.value = (document.PaymentForm.balance.value -0) - (document.PaymentForm.paymentamount.value -0);
}
</script>

How do I incorporate your suggested function

Code:

<script type = "text/javascript">
function roundNumber(num, dec) {
var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
return result;
}
alert (roundNumber (12345.6789, 2));
</script>

into one to thus do the calculation and round the number?