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

Mole Fraction Calculator (amount-of-substance fraction)

Free mole fraction calculator — x = n/n_total for a binary mixture. Work from moles, masses or molality, and convert to 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₂). Dimensionless, between 0 and 1, and independent of temperature and pressure because it contains no volume term.
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.

Mole fraction is the proportion of a mixture's particles that belong to one component: x₁ = n₁ ÷ (n₁ + n₂). It counts entities rather than grams or millilitres, which makes it dimensionless, makes the fractions of all components sum to exactly one, and makes it completely independent of temperature and pressure. This calculator handles binary mixtures — two components in, two fractions out — and will take your composition as moles, as masses, or as a molality, then report the mole fraction, the mole percent and the mass percent side by side.

The reason to count particles rather than mass is that most of the physical chemistry that cares about composition also counts particles. Raoult's law says a component's partial vapour pressure is its mole fraction times its pure vapour pressure. Dalton's law says a gas's partial pressure is its mole fraction times the total. Every colligative property — freezing-point depression, boiling-point elevation, osmotic pressure — depends on how many solute particles are present and not at all on what they weigh. When a relationship is about the number of things, the concentration unit needs to be about the number of things too.

Both standards bodies define it the same way and disagree only on what to call it. The IUPAC Green Book lists three accepted names in its composition table — mole fraction, amount-of-substance fraction, and amount fraction — with mole fraction first. NIST Special Publication 811 gives the identical equation in section 8.6.2 but prefers "amount-of-substance fraction of B", on the grounds that a quantity's name should not contain the name of a unit, just as we say mass fraction rather than kilogram fraction. This page uses "mole fraction" in its heading because that is the name people search for, and mentions NIST's preference because a reader writing a paper needs to know it.

One thing worth being clear about up front: this page is exact and assumes nothing. Mole fraction is a bookkeeping ratio, so it holds for any mixture — ideal, non-ideal, associating, electrolyte — with no approximation whatsoever. It is the laws that consume a mole fraction that assume ideality, not the fraction itself. Raoult's law is an idealisation. Dalton's law is an idealisation for real gases. The colligative equations are idealisations for dilute solutions. The number this calculator returns is not.

The most useful thing the page shows is the gap between mole percent and mass percent. Mix 46.069 g of ethanol with 100 g of water and ethanol is 31.5 percent of the mixture by mass but only 15.3 percent of it by particle count, because an ethanol molecule weighs about two and a half times what a water molecule does. Heavier components always take a larger share of the mass than of the amount. Confusing the two is one of the most common composition errors in introductory chemistry, and the two figures sit next to each other here so the difference is impossible to miss.

Below the widget you will find the definition as both authorities state it, the derivation of the molality conversion, the hand-computed ethanol-and-water example the tests are built from, and the domain edges — including why a mole fraction outside the range 0 to 1 is rejected rather than being quietly clamped.

What is mole fraction calculator?

The mole fraction of a component, symbol x (or y for gaseous mixtures), is the amount of substance of that component divided by the total amount of substance in the mixture: x_B = n_B ÷ Σn. Because both numerator and denominator are amounts in moles, the ratio is a pure number with SI unit one — it carries no dimension at all. For a binary mixture the two fractions always add to exactly 1, so knowing one gives you the other.

The IUPAC Green Book, third edition, lists it in the section 2.10 composition table as 'mole fraction, amount-of-substance fraction, amount fraction' with the definition x_B = n_B/Σᵢnᵢ and SI unit 1. Its note 10 records the convention that x is used for condensed phases while y may be used for gaseous mixtures. NIST Special Publication 811, section 8.6.2, gives the same definition independently, adds the explicit statement that amount-of-substance fraction is 'a quantity of dimension one', and records its preference for that longer name over 'mole fraction'.

A mole fraction can be written as a percentage. NIST section 7.10.2 gives the example x_B = 0.0025 = 0.25 %, while cautioning against writing 'percentage by amount of substance' or '% (mol/mol)' — the percent sign means only the number 0.01 and cannot carry extra information. The clean forms are 'the amount-of-substance fraction is 15 %' or 'x = 0.15', and NIST also permits the ratio form x_B = 185 mmol/mol.

Because it involves no volume, mole fraction shares molality's key virtue: it does not change when you heat or cool the mixture. Molarity does. That is why phase diagrams, vapour–liquid equilibrium data and thermodynamic activity are all expressed in mole fraction, and why a mole fraction quoted at one temperature can be used at another without correction.

How to use this calculator.

  1. Decide which component is 'component 1'. Everything the calculator reports as a primary figure refers to that one. For a solution it is usually the solute; for a vapour mixture, whichever component you are interested in.
  2. Pick the mode that matches what you actually measured. Masses are the most common starting point in a teaching lab; moles are more common when the amounts came from a reaction; molality is what a colligative-property problem hands you.
  3. Enter both molar masses. They are required in every mode, because the mass percent output needs them even when the mole fraction does not. Sum the atomic masses of the exact formula, hydrate water included.
  4. For the 'both masses' mode, enter grams for each component. The calculator converts each to moles first, then takes the ratio — never take a ratio of masses and call it a mole fraction.
  5. For the molality mode, enter the molality of component 1 and the molar mass of the solvent. The calculation uses a basis of exactly one kilogram of solvent, which contains 1000 ÷ M₂ moles: for water that is 55.51 mol.
  6. For the 'convert to mass percent' mode, enter a mole fraction between 0 and 1. If you have a mole percent, divide it by 100 first — 15.3 % goes in as 0.153.
  7. Compare the two percentages before you leave the page. If the mole percent and the mass percent are far apart, the two molar masses are far apart, and any calculation that mixes the two units will be badly wrong.

The formula.

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

The definition is one line, and every mode is that line with the amounts arrived at differently.

x₁ = n₁ / (n₁ + n₂) definition, binary mixture x₂ = n₂ / (n₁ + n₂) and x₁ + x₂ = 1 identically nᵢ = mᵢ / Mᵢ amounts from masses x₁ = b / (b + 1000/M₂) amounts from a molality w₁ = n₁M₁ / (n₁M₁ + n₂M₂) mass fraction from amounts

The molality conversion deserves its derivation, because it looks like it came from nowhere. Take a basis of exactly one kilogram of solvent. By the definition of molality, that kilogram holds b moles of solute. The kilogram itself is 1000 grams of a substance of molar mass M₂ grams per mole, so it is 1000/M₂ moles of solvent — for water, 1000/18.015 = 55.5093 mol. Substitute both into the definition of mole fraction and you get x₁ = b/(b + 1000/M₂). Nothing else is assumed.

The conversion to mass percent works the same way in reverse. On a basis of one mole of mixture there are x₁ moles of component 1 weighing x₁M₁ grams and x₂ moles of component 2 weighing x₂M₂ grams, so the mass fraction of component 1 is x₁M₁ ÷ (x₁M₁ + x₂M₂). This is where the two percentages diverge. If M₁ is larger than M₂, the numerator is inflated more than the denominator and the mass percent exceeds the mole percent. If M₁ is smaller, the reverse happens. They coincide only when the two molar masses are equal.

Rounding: every intermediate is a full-precision Decimal and rounding happens once, at the return boundary, to ten decimal places. Because nothing is rounded part-way through, the identity x₁ + x₂ = 1 holds to the full precision the outputs carry, which the unit tests assert at compositions from x = 0 through to x = 1.

Invalid domain, stated plainly because a clamped value would be worse than an error. A mole fraction outside the interval from 0 to 1 is rejected: a component cannot be more than all of the mixture, and it cannot be less than none of it. A molar mass of zero or less is rejected. A negative amount or mass is rejected. And a mixture with zero total amount of substance is rejected, because 0/0 is not a composition — it is the absence of one. The endpoints themselves are legal: x = 0 and x = 1 describe a pure component, and the calculator returns them exactly.

A worked example.

Example

Mix 46.069 g of ethanol with 100.000 g of water and work out the composition both ways. Ethanol is C2H6O with a molar mass of 46.069 g/mol and water is 18.015 g/mol, both summed from the IUPAC/CIAAW 2021 abridged atomic weights. Convert each mass to an amount first: the ethanol is 46.069 ÷ 46.069 = 1.000 000 mol, chosen deliberately to make the arithmetic transparent, and the water is 100.000 ÷ 18.015 = 5.550 930 mol. The mixture therefore contains 6.550 930 mol of molecules in total. The mole fraction of ethanol is 1.000 000 ÷ 6.550 930 = 0.152 650, so ethanol accounts for 15.2650 percent of the particles, and water's fraction is 0.847 350, or 84.7350 percent. The two add to exactly 1. Now compare that with the mass figures. Ethanol is 46.069 g out of a total 146.069 g, which is 31.5392 percent by mass. The same mixture is 15.27 percent ethanol by particle count and 31.54 percent ethanol by mass — a factor of more than two apart. The reason is that an ethanol molecule weighs 46.069/18.015 = 2.5573 times what a water molecule weighs, so the heavier component claims a bigger share of the mass than of the count. This is the direction to remember: the heavier component's mass percent is always above its mole percent. Swap the labels — put 100 g of water in as component 1 and 46.069 g of ethanol as component 2 — and the inequality flips, because water is now the lighter component. If you were about to substitute a mass percent into Raoult's law or into a colligative equation, this example is the reason not to.

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

Frequently asked questions.

What is the difference between mole fraction and mass percent?
Mole fraction counts particles; mass percent weighs them. The mole fraction of a component is its amount in moles divided by the total amount in moles, and it is dimensionless. Mass percent is its mass divided by the total mass, times 100. The two agree only when every component has the same molar mass, which essentially never happens. In the worked example on this page, ethanol is 15.27 percent of an ethanol–water mixture by particle count and 31.54 percent of it by mass, because an ethanol molecule is about 2.56 times heavier than a water molecule. Use mole fraction wherever the physics counts particles — Raoult's law, Dalton's law, colligative properties — and mass percent wherever you are weighing things out.
Do mole fractions always add up to 1?
Yes, by construction. Each component's mole fraction is its amount divided by the total amount, so summing the fractions sums the numerators back to the denominator. For a binary mixture x₁ + x₂ = 1 exactly, which is why knowing one fraction gives you the other for free. For a three-component mixture the three fractions sum to 1, and so on. This is also a useful arithmetic check: if your fractions do not sum to 1, you have divided by the wrong denominator — most often by the amount of solvent rather than by the total amount, which gives a mole ratio rather than a mole fraction.
Does mole fraction change with temperature?
No. It is a ratio of two amounts of substance, and neither amount depends on temperature or pressure. Heat a sealed mixture, cool it, or compress it, and the mole fractions are unchanged. This puts mole fraction in the same category as molality and mass fraction, and firmly outside the category containing molarity, which falls as a solution warms and expands. It is one of the reasons phase diagrams, vapour–liquid equilibrium data and thermodynamic activities are all expressed in mole fraction: a composition quoted at one temperature can be carried to another without correction.
How do I convert molality to mole fraction?
Use x = b ÷ (b + 1000/M_solvent), where b is the molality in mol/kg and M_solvent is the solvent's molar mass in g/mol. The derivation takes a basis of exactly one kilogram of solvent: by the definition of molality it holds b moles of solute, and 1000 grams of a solvent of molar mass M is 1000/M moles. For water, M = 18.015 g/mol, so a kilogram is 55.5093 mol, and a 0.5 mol/kg solution has a solute mole fraction of 0.5 ÷ 56.0093 = 0.008927. Note how small that is: even a fairly concentrated-sounding molality is a tiny fraction of the particles in water, because a kilogram of water contains an awful lot of molecules.
Should I call it 'mole fraction' or 'amount-of-substance fraction'?
Both are correct and the two standards bodies differ on which they prefer. The IUPAC Green Book's composition table lists three accepted names — mole fraction, amount-of-substance fraction, amount fraction — in that order. NIST Special Publication 811, section 8.6.2 note 1, says it 'prefers the name amount-of-substance fraction of B, because it does not contain the name of the unit mole', drawing the analogy with mass fraction rather than kilogram fraction. In practice, 'mole fraction' is overwhelmingly what you will hear spoken and what you should search for; 'amount-of-substance fraction' is what to write if you are following NIST style. The symbol is x either way, or y for a gaseous mixture.
Can a mole fraction be greater than 1 or negative?
No, and this calculator rejects both rather than clamping them. A component's amount cannot exceed the total amount of the mixture it is part of, so the fraction cannot exceed 1; and neither an amount nor a total can be negative, so the fraction cannot be below 0. Both endpoints are legal and meaningful: x = 1 means a pure substance and x = 0 means the component is absent. If you are seeing a value outside the range, the usual causes are entering a mole percent where a fraction was expected (15.3 instead of 0.153), or dividing by the amount of solvent rather than by the total amount, which produces a mole ratio and is unbounded above.
Does this work for mixtures of more than two components?
The definition does; this widget does not. Mole fraction for any number of components is x_B = n_B ÷ Σn, with the sum running over every component present, and all the fractions still add to 1. The calculator on this page takes exactly two components, which covers the great majority of solution problems and every binary vapour–liquid case. For a ternary or higher mixture, add up all the amounts by hand to get the denominator, then divide each component's amount by it — the arithmetic is the same, there is just more of it. The two-component restriction is stated in the intro rather than hidden here.

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.

In this category

Embed

Quanta Pro

Paid features are coming later.

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