Mole fraction:
Mole fraction of a particular component of the solution is the ratio of number of moles of that component present in the solution to the total number of moles of all the components of the solution.
A solution of sucrose in water is labelled as 20% w/w.
It means that 100 g of solution contains 20 g of sucrose and 100−20=80 grams of water. The molar masses of sucrose and water are 342 g/mol and 18 g/mol respectively.
The number of moles of sucrose =20g342g/mol=0.0585mol
The number of moles of water =80g18g/mol=4.444mol
The mole fraction of sucrose =0.05850.0585+4.444=0.01299≃0.013
The mole fraction of water =1−0.013=0.987