Mole Fraction Calculator

Find the mole fraction of any component from mole amounts or from masses, and convert a known mole fraction into mass percent and molality.

⚗️ Mole Fraction Calculator
Moles of component A2.000 mol
mol
020
Moles of component B3.000 mol
mol
020
Mass of component A
g
Molar mass of component A
g/mol
Mass of component B
g
Molar mass of component B
g/mol
Mole fraction of solute0.0500
0 to 1
0.0010.999
Molar mass of solute
g/mol
Molar mass of solvent
g/mol
Mole fraction of A
—
Mole fraction of B
—
Mole percent of A
—
Total moles
—
Step-by-step working

⚗️ What is Mole Fraction?

Mole fraction is the amount of one component in a mixture divided by the total amount of everything present, counted in moles rather than grams or litres. For a component A the definition is xA = nA / ntotal, and in a simple two component mixture that becomes xA = nA / (nA + nB). It is dimensionless, it always lies between 0 and 1, and the fractions of all components in any mixture add to exactly 1. Multiply by 100 and you have mole percent, the same information on a per hundred scale. Because it counts particles instead of weighing them, mole fraction is the natural concentration unit whenever the physics depends on how many molecules are present rather than how heavy they are.

That distinction shows up constantly in practice. Raoult's law expresses the vapour pressure above a solution as the mole fraction of each component times its pure vapour pressure, because vapour pressure lowering is a counting effect at the liquid surface. Dalton's law does the same thing for gases, where an ideal gas mixture has partial pressures equal to mole fraction times total pressure, and where mole fraction is numerically identical to volume fraction. Chemical engineers write distillation and absorption balances in mole fractions so that the equilibrium relationships stay linear. Colligative property calculations for freezing point depression and boiling point elevation lean on the same counting logic, which is why mole fraction and molality, not molarity, appear in their derivations.

The most common misconception is that mole fraction and mass percent are interchangeable. They agree only when the components share the same molar mass, which almost never happens. A water and ethanol mixture at 25 mole percent ethanol works out to about 46 mass percent ethanol, because ethanol at 46.07 g/mol is roughly 2.6 times heavier per molecule than water at 18.015 g/mol. A related point is that mole fraction is temperature independent, since amounts of substance do not change when a solution warms up. Molarity does change, because volume expands, and that is precisely why phase equilibrium work avoids molarity.

This calculator handles the three routes chemists actually take. Enter mole amounts directly and it returns each component's mole fraction, the mole percent, and the total. Enter masses with molar masses and it converts to moles first, reports both mole fractions, and builds a table of moles, fractions, and mass percent for each component so you can see where the numbers diverge. Enter a known solute mole fraction with the two molar masses and it converts to mass percent and molality on a one mole basis, showing every intermediate mass. Each mode plots the relationship it computes, including the mass percent curve against an equal molar mass reference line that makes the size of the molar mass effect immediately visible.

📐 Formula

xA  =  nA ÷ (nA + nB)
xA = mole fraction of component A, dimensionless and between 0 and 1
nA, nB = amount of each component in moles
From masses: n = mass (g) ÷ molar mass (g/mol), then apply the mole fraction definition
Mole percent: mol% = 100 × x, and all mole percents sum to 100
Mole fraction to mass percent (1 mole basis): mass% = 100 × x Msolute ÷ [x Msolute + (1 − x) Msolvent]
Mole fraction to molality: m = 1000 x ÷ [(1 − x) Msolvent] in mol/kg, with Msolvent in g/mol
Dalton's law for gases: pA = xA × Ptotal; Raoult's law for solutions: pA = xA × pA°
Example: With 2 mol of A and 3 mol of B the total is 5 mol, so xA = 2/5 = 0.400000 and xB = 3/5 = 0.600000, summing to exactly 1 as the IUPAC definition of mole fraction requires.

📖 How to Use This Calculator

Steps

1
Choose how your data is given. Pick From Moles if you already know the mole amounts, From Masses if you have grams and molar masses, or Convert if you have a mole fraction and want mass percent and molality.
2
Enter the component values. Type the moles of each component, or the mass and molar mass of each, or the solute mole fraction with the solute and solvent molar masses.
3
Read the mole fractions. Read the mole fraction of each component, the mole percent, and the total moles, and confirm that the two fractions sum to exactly 1.
4
Check the table and chart. In From Masses mode read the per-component table of moles, fractions, and mass percent, and use the chart to see how the mole fraction responds as one component is varied.

💡 Example Calculations

Example 1 — A Simple Two Component Mixture

2 mol of component A mixed with 3 mol of component B

1
Total moles = 2 + 3 = 5.0000 mol
2
xA = 2 ÷ 5 = 0.400000, so component A is 40.0000 mole percent of the mixture
3
xB = 3 ÷ 5 = 0.600000, and the check xA + xB = 0.400000 + 0.600000 = 1.000000 confirms the arithmetic
xA = 0.400000, xB = 0.600000 (total 5.0000 mol)
Try this example →

Example 2 — A Dilute Component

0.75 mol of a minor component with 2.25 mol of the major component

1
Total moles = 0.75 + 2.25 = 3.0000 mol
2
xA = 0.75 ÷ 3 = 0.250000, that is 25.0000 mole percent
3
xB = 2.25 ÷ 3 = 0.750000. For an ideal gas mixture at 101.325 kPa, the minor component's partial pressure would be 0.25 × 101.325 = 25.33 kPa by Dalton's law.
xA = 0.250000, xB = 0.750000 (total 3.0000 mol)
Try this example →

Example 3 — Ethanol in Water from Masses

23.0 g of ethanol (46.07 g/mol) dissolved in 100 g of water (18.015 g/mol)

1
nethanol = 23.0 ÷ 46.07 = 0.499240 mol and nwater = 100 ÷ 18.015 = 5.550930 mol
2
Total = 0.499240 + 5.550930 = 6.050170 mol
3
xethanol = 0.499240 ÷ 6.050170 = 0.082517, while the mass percent of ethanol is 100 × 23 ÷ 123 = 18.70%. The two differ by more than a factor of 2 because ethanol molecules are far heavier than water molecules.
xethanol = 0.082517, xwater = 0.917483
Try this example →

Example 4 — One Mole of Salt in a Kilogram of Water

58.44 g of NaCl (58.44 g/mol) in 900 g of water (18.015 g/mol)

1
nNaCl = 58.44 ÷ 58.44 = 1.000000 mol and nwater = 900 ÷ 18.015 = 49.958368 mol
2
Total = 1 + 49.958368 = 50.958368 mol
3
xNaCl = 1 ÷ 50.958368 = 0.019624, under 2% by moles, even though the salt is 6.10% of the mixture by mass. Note that this treats NaCl as undissociated formula units, which is the convention for a stated formula mass.
xNaCl = 0.019624, xwater = 0.980376
Try this example →

Example 5 — Converting a Salt Mole Fraction to Mass Percent and Molality

Mole fraction 0.05 of NaCl (58.44 g/mol) in water (18.015 g/mol)

1
On a 1 mole basis: solute mass = 0.05 × 58.44 = 2.9220 g, solvent mass = 0.95 × 18.015 = 17.1142 g
2
Mass percent = 100 × 2.9220 ÷ (2.9220 + 17.1142) = 14.5836%
3
Molality = 0.05 mol ÷ 0.017114 kg = 2.9215 mol/kg. A mole fraction of only 5% corresponds to a fairly concentrated solution, which is why mole fraction and molality feel so different in magnitude.
Mass percent = 14.5836%, molality = 2.9215 mol/kg
Try this example →

Example 6 — The Ethanol Mole Fraction versus Mass Percent Gap

Mole fraction 0.25 of ethanol (46.07 g/mol) in water (18.015 g/mol)

1
On a 1 mole basis: ethanol mass = 0.25 × 46.07 = 11.5175 g, water mass = 0.75 × 18.015 = 13.5113 g
2
Mass percent = 100 × 11.5175 ÷ (11.5175 + 13.5113) = 46.0171%, nearly double the 25 mole percent value
3
Molality = 0.25 mol ÷ 0.013511 kg = 18.5031 mol/kg. The chart shows the mass percent curve bowing well above the equal molar mass reference line, and this gap is the direct consequence of ethanol being 2.6 times heavier per molecule.
Mass percent = 46.0171%, molality = 18.5031 mol/kg
Try this example →

❓ Frequently Asked Questions

What is the mole fraction formula?+
The mole fraction of component A is x_A = n_A / n_total, the moles of A divided by the total moles of everything present. In a two component mixture that is x_A = n_A / (n_A + n_B). Mole fraction is dimensionless, always falls between 0 and 1, and all component fractions in a mixture sum to exactly 1.
How do you calculate mole fraction from mass?+
Convert each mass to moles by dividing by its molar mass, then divide one component's moles by the total. For 23.0 g of ethanol (46.07 g/mol) in 100 g of water (18.015 g/mol): n = 0.4992 and 5.5509 mol, total 6.0502 mol, so the ethanol mole fraction is 0.4992/6.0502 = 0.0825.
Is mole fraction the same as mass percent?+
No, unless every component has an identical molar mass. Mole fraction counts molecules while mass percent weighs them. A solution that is 25 mole percent ethanol in water is about 46.02 mass percent ethanol, because each ethanol molecule carries about 2.6 times the mass of a water molecule.
How do you convert mole fraction to mass percent?+
Take a basis of exactly 1 mole of solution. The solute contributes x times its molar mass in grams, the solvent contributes (1 - x) times its molar mass. Mass percent = 100 x (x times M_solute) divided by the sum. With x = 0.05 for NaCl (58.44 g/mol) in water (18.015 g/mol), that gives 14.58%.
How do you convert mole fraction to molality?+
Molality = 1000 x / [(1 - x) x M_solvent], with the solvent molar mass in g/mol. For x = 0.05 NaCl in water, molality = 1000 x 0.05 / (0.95 x 18.015) = 2.9215 mol/kg. The formula comes from a 1 mole basis, where the solvent mass in kilograms is (1 - x) times M_solvent divided by 1000.
Why do mole fractions always add up to 1?+
Because each fraction is that component's share of the same total. Summing them gives (n_A + n_B + ...) divided by n_total, which is n_total divided by n_total, exactly 1. Any set of computed fractions that fails to sum to 1 contains an arithmetic error, so the check costs nothing and catches a lot.
What is mole percent?+
Mole percent is simply the mole fraction multiplied by 100. A mole fraction of 0.4 is 40 mole percent. It is the same quantity expressed on a per hundred scale, and mole percents across a mixture sum to 100 exactly as fractions sum to 1.
Why does Raoult's law use mole fraction rather than mass percent?+
Because vapour pressure lowering depends on how many solvent molecules occupy the surface, not on how heavy they are. Raoult's law states that the partial vapour pressure of a component equals its mole fraction in the liquid times its pure vapour pressure, so it is inherently a counting relationship.
Is mole fraction affected by temperature?+
No. Mole fraction depends only on amounts of substance, which do not change when a solution is heated or cooled. Molarity does change with temperature because the solution volume expands. That temperature independence is exactly why mole fraction and molality are preferred in phase equilibrium and colligative property work.
How is mole fraction used for gas mixtures?+
For ideal gases the mole fraction equals the volume fraction, and by Dalton's law the partial pressure of a component is its mole fraction times the total pressure. Dry air at a 0.209 oxygen mole fraction and 101.325 kPa total gives an oxygen partial pressure of 21.18 kPa.
Can mole fraction be greater than 1?+
No. Every mole fraction lies between 0 and 1 inclusive, because the numerator is always part of the denominator. A value of 1 means the sample is a pure substance with nothing else present, and a value of 0 means the component is entirely absent.
What is the difference between mole fraction and molality?+
Mole fraction divides the solute moles by the total moles of solution, so it is bounded between 0 and 1. Molality divides the solute moles by the solvent mass in kilograms, so it has units of mol/kg and grows without bound as the solvent fraction shrinks. Both are temperature independent, unlike molarity.
Should I count dissociated ions when computing mole fraction?+
It depends on the purpose. For a stated formula mass, as this calculator uses, NaCl is counted as one undissociated formula unit. For colligative properties you must apply the van 't Hoff factor, since NaCl dissociates into two particles in water and therefore depresses the freezing point roughly twice as much as its formula mole fraction alone would suggest.

What is the mole fraction formula?

The mole fraction of component A is x_A = n_A / n_total, the moles of A divided by the total moles of everything present. In a two component mixture that is x_A = n_A / (n_A + n_B). Mole fraction is dimensionless, always falls between 0 and 1, and all component fractions in a mixture sum to exactly 1.

How do you calculate mole fraction from mass?

Convert each mass to moles by dividing by its molar mass, then divide one component's moles by the total. For 23.0 g of ethanol (46.07 g/mol) in 100 g of water (18.015 g/mol): n = 0.4992 and 5.5509 mol, total 6.0502 mol, so the ethanol mole fraction is 0.4992/6.0502 = 0.0825.

Is mole fraction the same as mass percent?

No, unless every component has an identical molar mass. Mole fraction counts molecules while mass percent weighs them. A solution that is 25 mole percent ethanol in water is about 46.02 mass percent ethanol, because each ethanol molecule carries about 2.6 times the mass of a water molecule.

How do you convert mole fraction to mass percent?

Take a basis of exactly 1 mole of solution. The solute contributes x times its molar mass in grams, the solvent contributes (1 - x) times its molar mass. Mass percent = 100 x (x times M_solute) divided by the sum. With x = 0.05 for NaCl (58.44 g/mol) in water (18.015 g/mol), that gives 14.58%.

How do you convert mole fraction to molality?

Molality = 1000 x / [(1 - x) x M_solvent], with the solvent molar mass in g/mol. For x = 0.05 NaCl in water, molality = 1000 x 0.05 / (0.95 x 18.015) = 2.9215 mol/kg. The formula comes from a 1 mole basis, where the solvent mass in kilograms is (1 - x) times M_solvent divided by 1000.

Why do mole fractions always add up to 1?

Because each fraction is that component's share of the same total. Summing them gives (n_A + n_B + ...) divided by n_total, which is n_total divided by n_total, exactly 1. Any set of computed fractions that fails to sum to 1 contains an arithmetic error, so the check costs nothing and catches a lot.

What is mole percent?

Mole percent is simply the mole fraction multiplied by 100. A mole fraction of 0.4 is 40 mole percent. It is the same quantity expressed on a per hundred scale, and mole percents across a mixture sum to 100 exactly as fractions sum to 1.

Why does Raoult's law use mole fraction rather than mass percent?

Because vapour pressure lowering depends on how many solvent molecules occupy the surface, not on how heavy they are. Raoult's law states that the partial vapour pressure of a component equals its mole fraction in the liquid times its pure vapour pressure, so it is inherently a counting relationship.

Is mole fraction affected by temperature?

No. Mole fraction depends only on amounts of substance, which do not change when a solution is heated or cooled. Molarity does change with temperature because the solution volume expands. That temperature independence is exactly why mole fraction and molality are preferred in phase equilibrium and colligative property work.

How is mole fraction used for gas mixtures?

For ideal gases the mole fraction equals the volume fraction, and by Dalton's law the partial pressure of a component is its mole fraction times the total pressure. Dry air at a 0.209 oxygen mole fraction and 101.325 kPa total gives an oxygen partial pressure of 21.18 kPa.

Can mole fraction be greater than 1?

No. Every mole fraction lies between 0 and 1 inclusive, because the numerator is always part of the denominator. A value of 1 means the sample is a pure substance with nothing else present, and a value of 0 means the component is entirely absent.

What is the difference between mole fraction and molality?

Mole fraction divides the solute moles by the total moles of solution, so it is bounded between 0 and 1. Molality divides the solute moles by the solvent mass in kilograms, so it has units of mol/kg and grows without bound as the solvent fraction shrinks. Both are temperature independent, unlike molarity.