<script >
function sum() {
    var txtFirstNumberValue = document.getElementById('studentenrolled').value;
    var txtSecondNumberValue = document.getElementById('classsize').value;
    var result = parseInt(txtFirstNumberValue) / parseInt(txtSecondNumberValue);
    if (!isNaN(result)) {
       document.getElementById('nooftut').value = result;
    }
}
</script>
         <tr>
         <td><label for="studentenrolled">Student Enrolled</label>  </td>
        <td> <input type="text" name="studentenrolled" id="studentenrolled"  value="<?php echo $row['studentenrolled']; ?> " /></td>
         </tr>              
         <tr>
         <td><label for="classsize">Class Size</label>  </td>
         <td> <input type="text" id="classsize"  onkeyup="sum();" /></td>
         </tr> 
        <tr>
        <td><label for="nooftut">No Of Tutorial</label>  </td>
        <td> <input type="text" id="nooftut" disabled="disabled" /></td>
        </tr> 
How to I round up or down the results in "nooftut" Calculation : studentenrolled / class size = nooftut As studentenrolled is pulled from the db, I'm not able to round up or down