Calculating stat fields.