Use computed field to calculate Field collection
I've got it! After a lot of tries I found a solution:
This works for a computed field outside the collection.

$sum = 0;
$wrapper = entity_metadata_wrapper($entity_type, $entity);
foreach($wrapper-&gt;field_values as $collection) {
   $sum += $collection-&gt;field_total-&gt;value();
}
$entity_field[0]['value'] = $sum;