Sum of integer vaules of a multi value field using Computed Field Module
I don't have computed field installed anywhere so I can't test this, but the logic should be something along the lines of:

$field_items = field_get_items($entity_type, $entity, 'field_calories');

$total = 0;
foreach ($field_items as $item) {
  $total += $item['value'];
}

$entity_field[0]['value'] = $total;


Or if you absolutely need a one-liner:

$entity_field[0]['value'] = array_sum(array_map(function($a) { return $a['value']; }, field_get_items($entity_type, $entity, 'field_calories')));