Mole Fraction and Atom Fraction I'm probably overthinking this but would appreciate a peer check.
Mole fraction of element $i$ in compound: $\frac{\mathcal{M}_i}{\mathcal{M}}$
I used script M so as not to confuse with molar mass (often denoted as capital M).
Atom fraction of element $i$ in compound: $\frac{N_i}{N}$
Now, if Avogadro's number is atoms/mol then isn't the mole fraction equal to the atom fraction?
$$
\frac{N_i}{N}\frac{[\text{atom}]}{[\text{atom}]} \cdot \frac{N_a}{N_a}\frac{[\text{atom}/\text{mol}]}{[\text{atom}/\text{mol}]} = \frac{\mathcal{M}_i}{\mathcal{M}} \frac{[\text{mol}]}{[\text{mol}]}\\
\frac{N_a}{N_a}=1\\
\frac{N_i}{N}=\frac{\mathcal{M}_i}{\mathcal{M}}
$$
The fallacy lies in the assumption that mole fraction and the number fraction are always the same.
For example, take $\ce{Na2SO4}$
what is the atom fraction of Na: 2/(2+1+4) = 2/7
What about the mole fraction of Na? It 2$N_A$/$N_A$(2+1+4)= 2/7
However, this &quot;simple&quot; formula of yours breaks down in the case of mixtures even if we mix them in 1:1 mol ratio. Calculate the mol fraction of Na ions in a mixture using your formula for $\ce{NaCl}$ and $\ce{Na2SO4}$ and see that you will not get the right answer.