Mole Fraction Calculator
Find the mole fraction of each component in a two part mixture.
What it does
Mole fraction is a way of describing a mixture that counts particles rather than mass or volume. It is the number of moles of one component divided by the total number of moles present. Because it is a ratio of like quantities, it has no units.
This calculator handles a two component mixture. Enter the moles of each part and it returns both mole fractions and both mole percentages, which are simply the fractions expressed on a scale of one hundred.
With two moles of A and three of B, the total is five moles. Component A makes up 2 out of 5, or 0.4000, and component B makes up 0.6000. The matching mole percentages are 40.00 and 60.00 percent.
Mole fraction is especially useful in gas mixtures and in thermodynamics, where the partial pressure of a gas is its mole fraction times the total pressure. It also appears in Raoult's law for vapour pressure above a solution.
Both components must have a positive number of moles. If a third component is present in a real mixture, the two fractions from this tool will not add to one, so include it in the total before interpreting the result.
How to use
- Convert the amount of each component to moles if you have masses.
- Enter the moles of component A.
- Enter the moles of component B.
- Press calculate and read the two fractions.
- Use the mole percent lines when a report asks for percentages.
- Check that both inputs refer to the same mixture.
Formula
- n_A
- Moles of component A.
- n_B
- Moles of component B.
- x_A
- Mole fraction of A, a number between zero and one.
- x_B
- Mole fraction of B, equal to one minus x_A.
Because the two fractions share the same total, they always sum to one and their percentages sum to one hundred. A component with zero moles would have a fraction of zero, but the tool requires both inputs above zero so the mixture genuinely has two parts.
Worked example
Example: 2 mol of A and 3 mol of B
These are the form defaults, so the result is already shown.
- Add the moles: 2 plus 3 equals 5 mol total.
- Divide A by the total: 2 / 5 = 0.4000.
- Divide B by the total: 3 / 5 = 0.6000.
- Multiply by 100 for 40.00 and 60.00 mole percent.
- The tool shows 0.4000, 0.6000, 40.00 % and 60.00 %.
Reference table
| Moles of A | Moles of B | Fraction A | Fraction B |
|---|---|---|---|
| 1 | 1 | 0.5000 | 0.5000 |
| 2 | 3 | 0.4000 | 0.6000 |
| 7 | 3 | 0.7000 | 0.3000 |
| 9 | 1 | 0.9000 | 0.1000 |
Limits
- Handles exactly two components, so a third species must be folded into the total first.
- Assumes the amounts are already expressed in moles.
- Does not account for reaction or association between components.
- Ideal gas behaviour is needed if you plan to convert a fraction to partial pressure.
Common mistakes
- Using masses in grams where moles are required.
- Forgetting to include every component when finding the total.
- Reporting the fraction as a percentage without multiplying by one hundred.
- Assuming mole fraction equals mass fraction for different substances.
- Entering zero for one component and expecting a two part mixture.
Try it yourself
Quick checks. Answers sit tucked under each question.
1 mol of A and 1 mol of B?
0.5000 and 0.5000, or 50.00 % and 50.00 %.
7 mol of A and 3 mol of B?
0.7000 and 0.3000, or 70.00 % and 30.00 %.
Questions
What is mole fraction?
The moles of one component divided by the total moles of all components in the mixture.
Do mole fractions add to one?
Yes, when every component is included in the total.
How is mole percent different?
It is the mole fraction multiplied by one hundred.
Is mole fraction the same as mass fraction?
No. They differ whenever the components have different molar masses.
Why is mole fraction useful for gases?
In an ideal gas mixture, partial pressure equals mole fraction times the total pressure.
Can a mole fraction be negative?
No. Amounts of substance are positive, so every fraction lies between zero and one.