Mole fraction (Xi) tells you what share of the total moles in a mixture belongs to one component. It's the concentration unit chemists reach for when working with gas mixtures, vapor pressure (Raoult's law), and colligative properties, because unlike molarity or mass percent, it doesn't depend on volume or temperature — only on the amount of substance present.

How the Mole Fraction Calculator works

Each component's mole fraction is its own moles divided by the total moles of every component in the mixture: Xi = ni / ntotal. Because every component's moles are counted in that same total, the mole fractions of all components in a mixture always sum to exactly 1 (or 100% in mole-percent terms) — the calculator uses that sum as a built-in sanity check on every result.

If you only know how much of a substance you have by mass rather than by moles, the From Masses tab converts each mass to moles first using n = mass ÷ molar mass, then applies the same mole fraction formula to the derived moles.

Inputs and what they mean

Each row represents one component of the mixture: a short name for your own reference, plus either its moles directly or its mass and molar mass (in g and g/mol respectively). You need at least two components — a mole fraction only means something relative to the rest of the mixture. The molar mass of a substance can be looked up on a periodic table or a Molar Mass calculator, and is typically expressed in grams per mole (g/mol).

The input that moves the result most is the relative size of one component's moles compared to the others — doubling a small component's moles noticeably shifts its own fraction upward and slightly lowers everyone else's, since all fractions must still sum to 1.

Limits and edge cases

Mole fraction requires at least two components with non-negative moles and a total greater than zero — the calculator will show a prompt rather than a result if those conditions aren't met. Mole fraction should not be confused with mass fraction or volume fraction: a component can be the majority of a mixture by mass while still being a minority by moles (or vice versa) if its molar mass differs a lot from the other components, as shown in the salt-and-water example above. For reacting mixtures or systems with significant non-ideal behavior, mole fraction is still defined the same way, but activities (rather than raw mole fractions) are used in equilibrium and thermodynamic calculations — consult a chemistry reference for those more advanced cases.