Audited 29 Jul 2026·Last updated 28 Oct 2026·4 citations·Tier 2·0 uses

Mole Fraction Calculator (amount-of-substance fraction)

Find the mole fraction of a two-component mixture from moles, grams or molality, and convert between mole fraction, mole percent and mass percent.

Mole Fraction Calculator

What do you know?
Grams of the first component. Used by the 'both masses' mode.
g
Grams of the second component. Used by the 'both masses' mode.
g
Default 46.069 g/mol = ethanol (C2H6O), summed from IUPAC/CIAAW 2021 abridged standard atomic weights: 2(12.011) + 6(1.008) + 15.999.
g/mol
Default 18.015 g/mol = water (H2O), from IUPAC/CIAAW 2021 abridged standard atomic weights: 2(1.008) + 15.999.
g/mol
Moles of the first component. Used by the 'both amounts in moles' mode.
mol
Moles of the second component. The default, 5.55092978 mol, is 100 g of water. Used by the 'both amounts in moles' mode.
mol
Moles of solute per kilogram of solvent. The molality mode works on a basis of exactly 1 kg of solvent, which contains 1000 ÷ (molar mass of solvent) moles.
mol/kg
A dimensionless number between 0 and 1. If you have a mole percent, divide it by 100 first. Used by the 'convert to mass percent' mode.
Mole fraction of component 1
0.1527
x₁ = n₁ ⁄ (n₁ + n₂): the share of all molecules, or formula units, in the mixture that belong to component 1, from 0 to 1.
Mole fraction of component 2
0.8473
Mole percent of component 1
15.265 %
Mass percent of component 1
31.5392 %
Amount of component 1
1 mol
Amount of component 2
5.5509 mol

Background.

Weigh 46.069 g of ethanol into 100 g of water and, by mass, nearly a third of the mixture is ethanol: 31.54%. Count molecules instead and fewer than one in six is ethanol, a mole fraction of 0.1527. The gap comes from the molecules themselves. An ethanol molecule is about 2.56 times as heavy as a water molecule, so a given number of them accounts for far more of the weight.

The mole fraction is the counting version of composition: the amount of one component in moles divided by the total amount of everything in the mixture. Physical chemistry reaches for it whenever a property depends on how many particles are present rather than on what they weigh. Raoult's law gives a component's vapour pressure above an ideal solution as its mole fraction times the vapour pressure of the pure liquid. Dalton's law gives a gas's partial pressure as its mole fraction times the total pressure. Freezing-point depression, boiling-point elevation and osmotic pressure all depend on the number of solute particles.

You can start from whatever you have measured: two amounts in moles, two masses with their molar masses, a molality, or a mole fraction you want to express as a mass percent. Every route ends at the same set of results, the mole fractions of both components plus the mole percent and mass percent of component 1, with the amounts used shown alongside. The calculator works on two-component mixtures; component 1 is usually the solute, but the arithmetic treats the two alike.

The ratio itself is exact for any mixture, ideal or not. Where approximations come in is in the laws that use it, which assume ideal behaviour or dilute solutions.

What is mole fraction calculator?

Mole fraction, written x for liquids and solids and often y for gas mixtures, is x_B = n_B ⁄ Σn: the amount of substance B divided by the total amount of all components. It is a pure number between 0 and 1, and the fractions of all the components add to exactly 1. No volume enters it, so a mole fraction stays the same when a mixture is heated, cooled or compressed, which is not true of molarity. The IUPAC Green Book accepts three names, mole fraction, amount-of-substance fraction and amount fraction. NIST Special Publication 811 prefers amount-of-substance fraction, arguing that a quantity's name should not contain a unit, in the same way that mass fraction is not called kilogram fraction.

How to use this calculator.

  1. Choose the mode that matches what you know: two amounts in moles, two masses, a molality, or a known mole fraction to convert into mass percent.
  2. Enter both molar masses whatever the mode, since the mass percent needs them even when the mole fraction does not. Work them out from the exact formula, water of crystallisation included. The defaults are ethanol, 46.069 g/mol, and water, 18.015 g/mol.
  3. In the masses mode, enter grams of each component; each mass is turned into moles before any ratio is taken.
  4. In the molality mode, enter moles of component 1 per kilogram of component 2. The calculation works on exactly 1 kg of solvent, which for water is 55.51 mol.
  5. To convert a mole percent, divide it by 100 first, so 15.3% goes in as 0.153.

The formula.

x₁ = n₁ ⁄ (n₁ + n₂) x₁ + x₂ = 1

For two components, x₁ = n₁ ⁄ (n₁ + n₂) and x₂ = n₂ ⁄ (n₁ + n₂), so x₁ + x₂ = 1. The modes differ only in how n₁ and n₂ are found. From masses, each amount is nᵢ = mᵢ ⁄ Mᵢ. From a molality b, take exactly 1 kg of solvent: by definition it holds b moles of solute, and 1000 g of a solvent with molar mass M₂ is 1000 ⁄ M₂ moles, so x₁ = b ⁄ (b + 1000 ⁄ M₂). To turn a mole fraction into a mass percent, take 1 mol of mixture. It contains x₁ mol of component 1 weighing x₁M₁ grams and x₂ mol of component 2 weighing x₂M₂ grams, so mass percent = 100 × x₁M₁ ⁄ (x₁M₁ + x₂M₂).

That last expression shows when the two percentages part company. If component 1 has the larger molar mass, its mass percent is above its mole percent; if it is the lighter one, below; the two agree only when M₁ = M₂. Mole fractions outside 0 to 1, negative amounts or masses, molar masses of zero or less, and a mixture containing no substance at all have no meaning and are rejected. The endpoints are valid: x = 1 is a pure substance and x = 0 a component that is absent.

A worked example.

Example

Take 46.069 g of ethanol (C₂H₆O, 46.069 g/mol) and 100 g of water (18.015 g/mol). The ethanol is 46.069 ÷ 46.069 = 1 mol and the water is 100 ÷ 18.015 = 5.5509 mol, so the mixture holds 6.5509 mol of molecules. The mole fraction of ethanol is 1 ÷ 6.5509 = 0.1527, or 15.265 mol%, and water's is 5.5509 ÷ 6.5509 = 0.8473. The two add to 1. By mass the same mixture is 46.069 ÷ 146.069 = 31.5392% ethanol, roughly double the mole percent, because each ethanol molecule weighs 46.069 ÷ 18.015 = 2.5573 times as much as a water molecule. Enter water as component 1 instead and its mole fraction reads 0.8473 while its mass percent is only 68.4608%: the lighter component always holds a bigger share of the count than of the weight.

mass146.069
molar Mass146.069
mass2100
molar Mass218.015
solve ForfromMasses

Frequently asked questions.

How do I get a mole fraction from a molality?
Use x = b ⁄ (b + 1000 ⁄ M_solvent). A 0.5 mol/kg aqueous solution gives 0.5 ÷ (0.5 + 55.5093) = 0.0089, under 1% of the molecules present. A kilogram of water holds so many molecules that even a fairly strong-sounding molality is a small mole fraction, which is why dilute-solution formulas often treat x and b as proportional.
Does it count the ions of a salt such as NaCl separately?
No. It counts whatever unit you enter for component 1, here formula units. A 1 mol/kg NaCl solution (58.44 g/mol) gives x = 0.0177. For colligative properties the ions matter, and complete dissociation would double the solute particles; entering 2 mol of solute in the moles mode gives an ion fraction of 0.0348, though the mass percent from that run no longer means anything.
I divided by the moles of water and got a different number. Which is right?
Dividing by the solvent alone gives the mole ratio, not the mole fraction. In the ethanol example that is 1 ÷ 5.5509 = 0.1802, against a true mole fraction of 0.1527, because the denominator must include the ethanol too. A mole ratio has no upper limit, so values above 1 are a sign this is what happened.
Does a mole fraction change with temperature?
No. It is a ratio of two amounts of substance, and neither changes when a sealed mixture is heated, cooled or compressed. Molarity does change, because the solution's volume expands as it warms. That stability is why phase diagrams and vapour–liquid equilibrium tables are drawn in mole fraction, and why a value measured at one temperature can be carried to another.
How do I handle a mixture of three or more components?
Add up the moles of every component to get the denominator, then divide each amount by it; the fractions still sum to 1. To use this calculator for one component of a larger mixture, choose the moles mode and enter the combined moles of everything else as component 2. The mass percent will only be right if component 2's molar mass is set to the others' total mass divided by their total moles.
Should I use mole fraction or mass percent in Raoult's law?
Mole fraction. Raoult's law is stated in mole fractions because vapour pressure follows the proportion of molecules, not of mass, so putting the ethanol example's 0.3154 mass fraction in place of its 0.1527 mole fraction would roughly double ethanol's predicted contribution to the vapour pressure. Ethanol and water also deviate from ideal behaviour, forming an azeotrope, so even the correct mole fraction gives only a first estimate.

References& sources.

  1. [1]IUPAC, 'Quantities, Units and Symbols in Physical Chemistry' (the Green Book), 3rd edition, 2nd printing 2012 (ISBN 978-0-85404-433-7), section 2.10, composition-of-mixtures table: 'mole fraction, amount-of-substance fraction, amount fraction', symbols x and y, definition x_B = n_B/Σᵢnᵢ, SI unit 1, with note 10 giving the x-for-condensed-phases and y-for-gases convention. Free full-text searchable PDF; retrieved 2026-07-29.
  2. [2]NIST Special Publication 811, 2008 edition, section 8.6.2 'Mole fraction of B; amount-of-substance fraction of B' — quantity symbol x_B (also y_B), SI unit one (1), 'ratio of the amount of substance of B to the amount of substance of the mixture: x_B = n_B/n', with note 1 recording NIST's preference for the name 'amount-of-substance fraction'. Consulted as an authority independent of IUPAC; it agrees on every element of the definition. Retrieved 2026-07-29.
  3. [3]NIST Special Publication 811, 2008 edition, section 7.10.2 '%, percentage by, fraction', worked example: 'x_B = 0.0025 = 0.25 %', together with the instruction to avoid '% (mol/mol)' and 'percentage by amount of substance', and the permitted ratio form x_B = 185 mmol/mol. Used as this page's independent numeric cross-check of the mole-percent output. Retrieved 2026-07-29.
  4. [4]IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), Standard Atomic Weights 2021, abridged values — used to build the default molar masses on this page: carbon 12.011, hydrogen 1.008, oxygen 15.999, giving M(C2H6O) = 46.069 g/mol and M(H2O) = 18.015 g/mol. Retrieved 2026-07-29.

How this page was produced

Published by
Quanta Calculator
Primary sources
4 cited below
Method
x₁ = n₁ ⁄ (n₁ + n₂) x₁ + x₂ = 1
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon