Try this:
if($row['CalltimeThisWeek']==0){
$number = 0;
} else {
$number = ($row['EWD'] / $row['CalltimeThisWeek']);
}
These aren't necessary after the loop:
$row['CalltimeThisWeek'];
$row['EWD'];
Also, you need to convert your timestamps to divisible integers: http://php.net/manual/en/function.mktime.php
Don't forget: You need to then place your $number math and echo statements within the while loop, otherwise it will only use the last number it gets in the variable and produce one result.