Logo

MonoCalc

/

Mole Fraction Calculator

Chemistry

n = m / M n = V·ρ / M n = PV / RT x_i = n_i / Σn M̄ = Σm / Σn

Examples:

Quick picks fill the empty row you last clicked, or add a new one:

Ethanol

#1

C₂H₆O · M = 46.069 g/mol
Preset for ethanol: 0.7893 g/mL at 20 °C. Edit it for another temperature.

Water

#2

H₂O · M = 18.015 g/mol
Preset for water: 0.997 g/mL at 25 °C. Edit it for another temperature.

2 of 10 components

Mole fraction of Ethanol
0.2364
23.64 mol % · 44.19 % of the mass (w = 0.4419)
Mean molar mass M̄
24.65 g/mol
Total amount Σn
3.624 mol
Total mass Σm
89.31 g

Composition table

ComponentM (g/mol)m (g)n (mol)xmol %wmass %
Ethanol
46.06939.470.85660.236423.640.441944.19
Water
18.01549.852.7670.763676.360.558155.81
TotalM̄ = 24.6589.313.6241.00001001.0000100

Mole fractions count formula units: NaCl counts once, not as two ions.

Volumes don't add up
Mixed volumes aren't additive. 50 mL + 50 mL of ethanol and water gives less than 100 mL, but the mole fractions above don't depend on that.

Out of every 100 molecules (formula units)

Each square ≈ 1 mol %. Counts are rounded so the grid totals 100.

Share of molecules vs share of mass

By moles (x)

By mass (w)

Ethanol: 23.6 % of the moles · 44.2 % of the mass

Water: 76.4 % of the moles · 55.8 % of the mass

Water is 76.4 % of the molecules but only 55.8 % of the mass, because at 18.015 g/mol it is lighter than the mixture's mean molar mass (24.65 g/mol).

Step-by-step

n(Ethanol) = V·ρ / M = 50.00 mL × 0.7893 g/mL = 39.47 g; 39.47 g ÷ 46.069 g/mol = 0.8566 mol

Each liquid is converted to a mass on its own, before mixing.

n(Water) = V·ρ / M = 50.00 mL × 0.9970 g/mL = 49.85 g; 49.85 g ÷ 18.015 g/mol = 2.767 mol

Each liquid is converted to a mass on its own, before mixing.

Σn = 0.8566 + 2.767 = 3.624 mol

x(Ethanol) = n / Σn = 0.8566 mol ÷ 3.624 mol = 0.2364

x(Water) = n / Σn = 2.767 mol ÷ 3.624 mol = 0.7636

M̄ = Σm / Σn = 89.31 g ÷ 3.624 mol = 24.65 g/mol

Mean molar mass of the mixture; it also equals Σ x·M.

Next: use these mole fractions for vapour pressure in the Raoult's Law Calculator, partial pressures in the Ideal Gas Law Calculator, or look up a formula's mass in the Molar Mass Calculator.

About This Tool

Mole Fraction Calculator – Count Particles, Not Grams

The mole fraction of a component is its share of all the particles in a mixture. This calculator works it out for 2 to 10 components from whatever you measured: grams, moles, millilitres of a liquid or litres of a gas. It also converts a composition between mass %, mol % and ppm, and turns a molality or molarity into a mole fraction. Every result comes with a step-by-step derivation and two pictures of the mixture.

The mole fraction formula

n_i = m_i / M_i          (mass → moles)
x_i = n_i / Σ n_j        (mole fraction, Σ x_i = 1)
mol %_i = 100 · x_i

Mole fraction is dimensionless: moles divided by moles. IUPAC writes x for liquids and solids and y for gases, but the arithmetic is the same. Because every component is a share of one total, the fractions always add up to exactly 1, which the results table prints as a check.

Why mole fraction counts particles, not mass

Mix 50 mL of ethanol with 50 mL of water. The ethanol weighs about 39.5 g and the water about 49.9 g, so ethanol is roughly 44 % of the mass. But an ethanol molecule (46.07 g/mol) is more than twice as heavy as a water molecule (18.02 g/mol), so the same mass holds far fewer molecules. Counted by particles, ethanol is only about 24 % of the molecules: x_ethanol ≈ 0.236.

The rule is general. A light component such as water, hydrogen or helium makes up a bigger share of the molecules than of the mass, and a heavy component makes up a smaller share. The "share of molecules vs share of mass" bars above draw this as ribbons that narrow or widen between the two bars.

Converting mass % to mole fraction

To go from a mass basis to a mole basis, divide each mass fraction by its molar mass and renormalise. Going the other way, multiply by the molar mass:

x_i = (w_i / M_i) / Σ (w_j / M_j)
w_i = x_i·M_i / Σ (x_j·M_j)
M̄  = Σ x_i·M_i               (mean molar mass)

For example, 37 % w/w hydrochloric acid is only x_HCl ≈ 0.225, and dry air (78.08 mol % N₂, 20.95 % O₂, 0.93 % Ar, 0.04 % CO₂) has a mean molar mass of about 28.97 g/mol. Mark the last row as the balance to type "3.5 % NaCl, rest water" directly, and open the batch panel to turn a composition into masses and volumes to weigh out.

Gas mixtures and the STP trap

By Avogadro's law, equal volumes of ideal gases at the same temperature and pressure contain equal numbers of moles. So when every amount is a gas volume, volume fraction equals mole fraction and no temperature or pressure is needed. When gas volumes are mixed with grams or moles, each volume is converted with n = PV / RT.

“STP” is not one condition
Older textbooks use 0 °C and 1 atm (22.414 L/mol). IUPAC has used 0 °C and 1 bar since 1982 (22.711 L/mol). Room conditions of 25 °C and 1 atm give 24.465 L/mol. Pick the one your problem means.

From molality or molarity

For a solute in one solvent, a molality b gives the mole fraction directly, because 1 kg of solvent is 1000 / M_solvent moles:

x_solute = b / (b + 1000 / M_solvent)
b = 1000·c / (1000·ρ − c·M_solute)     (molarity → molality)

A 2.922 mol/kg aqueous solution has x_solute ≈ 0.0500. Molarity needs the solution's density as well, since a litre of solution contains an unknown mass of solvent otherwise.

Formula units vs dissolved particles

Standard mole fractions count formula units: one NaCl counts once. For colligative effects such as vapour-pressure lowering, what matters is the number of dissolved particles, so the optional "count dissolved ions" switch multiplies each amount by its particle factor i (2 for NaCl, 3 for CaCl₂). This assumes complete dissociation; real electrolytes dissociate less as concentration rises.

Where mole fractions are used

  • Raoult's law: the vapour pressure of each component is p_i = x_i·p_i*.
  • Dalton's law: the partial pressure of a gas is p_i = y_i·P_total.
  • Colligative properties: vapour-pressure lowering, and through molality, freezing point depression and boiling point elevation.
  • Thermodynamics: mixing entropy and Gibbs energy are written in terms of x ln x.
Mixed volumes aren't additive
Each liquid volume is converted to a mass with its own density before mixing, so the shrinkage you see when ethanol and water are combined does not change the mole fractions.

Frequently Asked Questions

Is the Mole Fraction Calculator free?

Yes, Mole Fraction Calculator is totally free :)

Can I use the Mole Fraction Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Mole Fraction Calculator?

Yes, any data related to Mole Fraction Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this mole fraction calculator work?

It converts every amount you enter to moles (mass ÷ molar mass, liquid volume × density ÷ molar mass, or PV/RT for a gas) and divides each component's moles by the total, x_i = n_i / Σn. The other tabs convert a composition between mole fraction, mol %, mass fraction, mass % and ppm, or turn a molality or molarity into a mole fraction.

What is the difference between mole fraction and mass fraction?

Mole fraction counts particles, so it is moles of one component over total moles. Mass fraction is grams of one component over total grams. A light component such as water is a bigger share of the molecules than of the mass, and a heavy one is a smaller share.

Do the mole fractions always add up to 1?

Yes. Because every x_i is a share of the same total, Σx_i = 1 (or 100 mol %). The results table prints the sum as a visible check. In the composition tab, values that do not add up to the whole are scaled so that they do, and the original sum is shown.

Why is the mole fraction of a gas equal to its volume fraction?

By Avogadro's law, equal volumes of ideal gases at the same temperature and pressure hold the same number of moles. So when every amount is a gas volume measured at one T and P, x_i = V_i / ΣV and no temperature or pressure is needed. Real gases follow this closely at ordinary conditions.

Does NaCl count as one particle or two?

Standard mole fractions count formula units, so one NaCl counts once. Switch on "Count dissolved ions (ideal)" to count dissolved particles instead, with i = 2 for NaCl or 3 for CaCl₂. That basis assumes complete dissociation, which overstates the particle count in concentrated solutions.

How accurate are the results?

The arithmetic is exact to the precision shown, with IUPAC atomic masses for every formula. Liquid volumes depend on the density you use, which changes with temperature, and gas volumes assume ideal behaviour. Volume contraction on mixing does not affect the mole fractions, because each liquid is weighed by volume before mixing.