I assume you're displaying the numbers with some form of loop, such as "while." Essentially, you want to create a new variable, call it $n and assign it a value of 0. Then after each of your numbers is displayed, add it to $n. Once you've run through all the numbers, $n will represent the total.
So:
$n=0;
while ($row=mysql_fetch_array($result)) {
echo "$row[number]";
$n=$n+$row['number'];
}
echo $n;