Mole fraction
A mass fraction counts grams and a volume fraction counts cubic centimetres. A mole fraction counts particles — which is often what actually matters in a reaction.
For a mixture of just A and B
mole fraction of A = moles of A ÷ (moles of A + moles of B)
mole fraction of B = moles of B ÷ (moles of A + moles of B)
The mole fraction of a component of a mixture is the ratio the amount of that component, in moles, bears to the total amount of all the components in moles.
You need one thing from grade 10
The masses have to be turned into moles before any of this works, and the relationship for that is the one you already have: n = m ÷ M, where M is the molar mass. Everything below is that relationship used twice and then a division.
Worked example — sodium hydroxide in water
Problem
What is the mole fraction of sodium hydroxide in a solution made by dissolving 40 g of sodium hydroxide (NaOH) in 180 g of water (H2O)?
Step 1 — moles of water
molar mass of water = (1 × 2 + 16) g mol-1 = 18 g mol-1
amount of water = 180 g ÷ 18 g mol-1
= 10 mol
= 10 mol
Step 2 — moles of sodium hydroxide
molar mass of NaOH = (23 + 16 + 1) g mol-1 = 40 g mol-1
amount of NaOH = 40 g ÷ 40 g mol-1
= 1 mol
= 1 mol
Step 3 — the mole fraction of NaOH
mole fraction of NaOH = moles of NaOH ÷ (moles of water + moles of NaOH)
= 1 ÷ (10 + 1)
= 1 ÷ 11
And the other component
The mole fraction of water
mole fraction of water = moles of water ÷ (moles of water + moles of NaOH)
= 10 ÷ (10 + 1)
= 10 ÷ 11
Add the two and you get 10/11 + 1/11 = 11/11 = 1. The mole fractions of the components of a mixture always add to one.
True of all three fractions
The mole fractions of a mixture add to 1, and so do the mass fractions, and so do the volume fractions. None of the three has units. That sum is the quickest check on any answer you get.