calculate Mass Fraction