Mass fraction refers to the fraction of a component in a solution when the amounts (component and solution) are expressed in mass (weight). In other words, mass fraction is the ratio of the mass (or weight) of a component to the total mass (or weight) of the solution.
mtot = Mass of the solution
Suppose a solution is prepared by dissolving two solutes A and B in a solvent C.
mC = Mass of component C
mtot = mA + mB + mC
Since value of mass fraction is obtained by dividing mass of a component by total mass of the solution, it dimensionless. However, sometimes it is written as gram/gram or Kg/Kg.
ωA + ωB + ωC = 1
In contrast to density, mass fraction is independent of temperature i.e., if temperature changes, the value of mass fraction does not change.