Mole Fraction Calculator
Find the mole fraction of each component in a mixture.
Results update as you type.
How it works
Mole fraction describes what proportion of a mixture each component makes up on a per-molecule basis, and this calculator finds it for a two-component mixture. You enter the moles of component A and component B, and it returns the mole fraction of each. A mole fraction is simply the moles of one component divided by the total moles present, giving a dimensionless number between zero and one; the fractions of all components always sum to one. Unlike mass percent, mole fraction counts particles rather than weighing them, which is exactly what many physical laws require. It appears throughout chemistry and physics: Raoult's law uses mole fraction to predict a solution's vapour pressure, Dalton's law relates it to partial pressures in gas mixtures, and it underlies many colligative property calculations. Because it is based on amounts rather than volumes or masses, mole fraction is temperature-independent and unambiguous. Students preparing solutions, engineers working with gas mixtures, and anyone analysing composition use it regularly. To calculate it, make sure both quantities are in moles, converting from grams first if needed. Enter the moles of each component to see both mole fractions.
xA = nA / (nA + nB)
The mole fraction of a component is the moles of that component divided by the total moles of all components in the mixture. For a two-component system, component A's mole fraction is its moles over the sum of both, and component B's is its moles over the same total. The two mole fractions always add up to exactly one, since together they account for the whole mixture.
Source:Chemistry (mixture composition)
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter moles of component a and moles of component b.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Mole fraction A updates instantly as you type — no button to press.
Frequently asked questions
What is mole fraction?
Mole fraction is the ratio of the moles of one component to the total moles of all components in a mixture. It is a dimensionless number between zero and one that describes composition on a particle basis. The mole fractions of every component in a mixture always add up to exactly one, since together they represent the entire mixture.
How do I calculate mole fraction?
Divide the moles of the component you are interested in by the total moles of all components. For a mixture of 1 mole of A and 3 moles of B, the total is 4 moles, so A's mole fraction is 0.25 and B's is 0.75. Convert any masses to moles first, then apply the ratio for each component.
Why use mole fraction instead of mass percent?
Mole fraction counts particles rather than weighing them, which is what many physical laws are built on. Raoult's law, Dalton's law of partial pressures, and colligative property equations all use mole fraction because these phenomena depend on the number of particles present, not their mass. Mole fraction is also temperature-independent and dimensionless, making it convenient for theoretical work.
Do mole fractions always add to one?
Yes. Because each mole fraction is a component's share of the total moles, adding the fractions of all components gives the whole, which equals one. In a two-component mixture, if one component has a mole fraction of 0.3, the other must have 0.7. This property is a useful check on your calculations.
Can I use it for gas mixtures?
Absolutely. Mole fraction is widely used for gas mixtures, where it directly relates to partial pressure through Dalton's law: a gas's partial pressure equals its mole fraction times the total pressure. Since equal moles of ideal gases occupy equal volumes at the same conditions, mole fraction also equals the volume fraction for ideal gases, making it especially handy for gas analysis.