Mole Fraction Calculator: 5 Free Modes, Fast Exact Results

Mole Fraction Calculator

Mole fraction XA = nA ÷ ntotal. Enter any number of components by formula and mass (or moles) and this mole fraction calculator gives the mole fraction and mole percent of each one, checks that they sum to 1, converts between mole fraction, mass fraction, molality and molarity, applies Raoult's law to vapour pressure, and handles gas mixtures with partial pressures.

✓ Trusted by students, teachers & process engineers
⚖️ Any number of components🧬 Mass % ↔ mole fraction💧 Solute + solvent (molality link)🌪️ Raoult's law & partial pressure📈 Tables & graphs↺ One-click reset🔒 100% free

Mole Fraction of Every Component in a Mixture

List the components one per line or separated by semicolons as formula amount unit (g, kg, mg, mol, mmol). The mole fraction calculator converts each to moles, sums them and divides. Molar masses come from the formula; you may also type a name with an explicit molar mass, e.g. polymer 5 g M=2500.

46 g ethanol + 54 g water 5.85 g NaCl in 100 g water Glucose 18 g + water 182 g Dry air (by moles) Benzene 39 g + toluene 46 g Methanol + ethanol + water Antifreeze 62 g + water 250 g 49% sulfuric acid Sucrose 34.2 g + water 90 g Brass 70 : 30 by mass

Mole Fraction of a Solute in a Solvent (with Molality and Mass %)

The classic textbook problem: one solute, one solvent. Give the solute (formula or molar mass), its amount and the solvent mass. You get Xsolute, Xsolvent, molality and mass percent together, so you can see how the units relate.

34.2 g sucrose in 90 g water 1 mol NaCl in 1 kg water 36 g glucose in 100 g water 12.8 g naphthalene in 78 g benzene 12 g urea in 88 g water 2.54 g iodine in 100 g CCl₄

Convert Mass Percent to Mole Fraction (or Mole Fraction to Mass Percent)

Two-component mixture. Give the composition as mass % of component A or as the mole fraction of A, plus both formulas, and the mole fraction calculator converts on a 100 g (or 1 mol) basis and also reports molality of A in B.

40 wt% ethanol in water 98 wt% sulfuric acid 10 wt% NaOH X ethanol = 0.2 → wt% X NH₃ = 0.1 → wt% 50 wt% benzene in toluene 37 wt% hydrochloric acid

Raoult's Law: Vapour Pressure from Mole Fraction

PA = XA P°A. For a non-volatile solute give P° of the solvent only (P°B = 0); for two volatile liquids give both and the calculator also returns the vapour-phase mole fractions. Enter the liquid composition as moles or masses.

Benzene + toluene at 25 °C Water + sucrose (non-volatile) Water + 0.1 mol glucose at 30 °C Ethanol + methanol 1 : 1 Hexane + heptane (kPa) Water + glycol at 20 °C

Gas Mixture: Mole Fractions, Partial Pressures and Average Molar Mass

Dalton's law: Pi = Xi Ptotal. List the gases with amounts (mol, g, or % by volume — for ideal gases volume % = mole %), give the total pressure, and get every partial pressure, the average molar mass and the gas density.

Dry air at 1 atm 2 mol O₂ + 8 mol N₂ at 5 atm 4 g H₂ + 8 g He at 2 atm Natural gas (kPa) Flue gas at 200 °C Heliox 21/79 at 4 atm 28 g N₂ + 32 g O₂ + 44 g CO₂

🕘 Recent calculations

  • No calculations yet — your last 10 results will appear here.

Formulas: Xi = ni / Σn · ΣXi = 1 · mole % = 100 Xi · mass fraction wi = XiMi / ΣXjMj · Xsolute = m / (m + 1000/Msolvent) · molality m = 1000 Xsolute / (Xsolvent Msolvent) · Raoult: Pi = Xi P°i, Ptotal = ΣPi, vapour yi = Pi/Ptotal, ΔP = Xsolute P° · Dalton: Pi = Xi Ptotal · average molar mass = ΣXiMi · gas density = PM/RT · mole fraction is dimensionless and independent of temperature · IUPAC 2021 atomic weights.

A mole fraction calculator tells you what share of the molecules in a mixture belong to each component. Mix 46 g of ethanol (1.00 mol) with 54 g of water (3.00 mol) and ethanol’s mole fraction is 1.00 ÷ 4.00 = 0.250; water’s is 0.750; the two add up to exactly 1. No units, no volume, no temperature — just a count of particles — which is why the mole fraction sits at the centre of Raoult’s law, Dalton’s law of partial pressures and every ideal-solution formula in physical chemistry.

The free mole fraction calculator on this page has five modes: mole fractions from moles or grams of up to five components, mole fraction from a mass percent, mass percent and molality from a mole fraction, vapour pressure of a solution by Raoult’s law with the vapour-phase composition, and gas mixtures — partial pressures from mole fractions and the average molar mass of the mix. Every result shows the formula, the substituted numbers, a table and a bar chart, and can be copied, downloaded or printed.

Below the tool you will find the definition and formula, worked examples for ethanol–water, air and sugar solutions, the conversions to mass percent and molality derived step by step, Raoult’s and Dalton’s laws with numbers, a reference table of common mixtures, ten practice problems with answers, an exam checklist and the questions students ask most.

✍️ Ahmad Raza, M.Phil. Chemistry ✓ Verified Expert 📅 Last updated September 8, 2026

Key Takeaway

Mole fraction XA = nA ÷ ntotal. Convert every component’s mass to moles with its molar mass, add them up, divide each by the total. The fractions of all components sum to 1; they are dimensionless and independent of temperature and pressure. 46 g ethanol + 54 g water → Xethanol = 0.250, Xwater = 0.750. The mole fraction calculator above does this for up to five components and converts to mass percent, molality and partial pressure.

📑 Table of Contents (click to expand)
  1. What Is a Mole Fraction Calculator?
  2. How to Use the Mole Fraction Calculator
  3. The Five Modes Explained
  4. The Mole Fraction Formula
  5. Worked Example: Ethanol and Water
  6. Mole Fraction From Mass Percent
  7. Mass Percent and Molality From Mole Fraction
  8. More Worked Examples
  9. Raoult’s Law and Vapor Pressure
  10. Dalton’s Law and Gas Mixtures
  11. Average Molar Mass of a Mixture
  12. Reference Table: Common Mixtures
  13. Mole Fraction vs Other Concentration Units
  14. Properties of the Mole Fraction
  15. Mole Fraction in Colligative Properties
  16. Who Uses a Mole Fraction Calculator
  17. Full Walkthrough: An Exam Problem
  18. A Short History
  19. Limits and Assumptions
  20. Practice Problems With Answers
  21. Tips for Accurate Results
  22. Common Mistakes
  23. How This Calculator Is Different
  24. Where the Numbers Come From
  25. Exam Checklist
  26. Frequently Asked Questions
  27. 10 Facts Worth Knowing
  28. Final Thoughts
mole fraction calculator showing 46 g ethanol and 54 g water giving X ethanol 0.25 and X water 0.75 with moles of each component and a bar chart
The mole fraction calculator: masses or moles of each component in, mole fractions that sum to 1 out, with the moles table and chart.

What Is a Mole Fraction Calculator?

The mole fraction of a component is its amount in moles divided by the total moles of everything in the mixture. IUPAC calls it the amount fraction and defines it as “amount of a constituent divided by the total amount of all constituents in the mixture”; the symbol is x for liquids and solids and y for gases. A mole fraction calculator takes masses or moles of each component, converts masses to moles with the molar masses, sums them and divides.

Three features make the mole fraction different from every other concentration unit. It is dimensionless — a pure ratio between 0 and 1. It is symmetric — there is no special “solvent”; every component gets a fraction and the fractions sum to 1. And it depends on nothing but the counts of particles, so temperature, pressure and volume cannot change it.

Those properties are exactly what the laws of ideal mixtures need. Raoult’s law says each component’s vapour pressure is its mole fraction times its pure vapour pressure; Dalton’s law says each gas’s partial pressure is its mole fraction times the total pressure. A mole fraction calculator is therefore the first step in vapour-pressure, partial-pressure, distillation and colligative-property problems.

Notation you will see

xA or XA — mole fraction of A in a liquid or solid phase.

yA — mole fraction of A in a gas or vapour phase.

χA (chi) — older texts; same meaning.

mol % — mole fraction × 100. The mole fraction calculator shows both.

How to Use the Mole Fraction Calculator

  1. Choose a mode. From Moles or Mass for the standard question; From Mass % when a mixture is given by weight; To Mass % & Molality for the reverse; Vapor Pressure for Raoult’s law; Gas Mixture for partial pressures and average molar mass.
  2. Enter each component as a formula (C2H5OH, H2O, C12H22O11) or a molar mass, with its amount in g, kg, mg or mol. The mole fraction calculator handles up to five components; leave unused rows blank.
  3. Keep the units consistent within a mode — all masses or all moles. Mixed inputs are refused with a clear message, because a gram and a mole are not comparable until converted.
  4. Press Calculate. The mole fractions appear in blue (they always sum to 1.0000), with the moles of each component, the formula with numbers, a table and a bar chart underneath.
  5. Export or reset. Copy, CSV, TXT, print and share buttons follow every result; each mode has its own Reset; the last ten results stay in the history box.

The example chips (ethanol–water, dry air, sucrose solution, benzene–toluene) preload classic problems so you can see the mole fraction calculator’s working before entering your own.

The Five Modes Explained

Mode You enter Formula used You get
1. From Moles or Mass2–5 components, g or molXi = ni ÷ ΣnX of each, mol %, average M
2. From Mass %wt % of each componentni = wi ÷ Mi per 100 gX of each
3. To Mass % & MolalityX of solute, solute and solvent formulasw = X MA ÷ [X MA + (1−X) MB] ; m = 1000 X ÷ [(1−X) MB]mass %, mol/kg
4. Vapor PressureAmounts, pure vapour pressures P°Pi = Xi P°i ; yi = Pi ÷ PtotalPtotal, ΔP, vapour composition
5. Gas MixtureGases, amounts, total P, TPi = yi P ; Mavg = ΣyiMipartial pressures, Mavg, density

The Mole Fraction Formula

XA = nA ÷ (nA + nB + nC + …)

XA + XB + XC + … = 1     with     ni = massi ÷ Mi

For a two-component mixture the mole fraction calculator needs only one independent number: once XA is known, XB = 1 − XA. For three components there are two independent fractions, and so on. The mole fraction calculator always prints every fraction and their sum so you can see the constraint being satisfied.

Because it divides moles by moles, the mole fraction reported by the mole fraction calculator carries no unit, which is why it appears in thermodynamic expressions such as ΔGmix = RT Σ ni ln xi and in the definition of an ideal solution without any conversion factor.

Worked Example: 46 g Ethanol + 54 g Water, Step by Step

Step 1 — molar masses. C2H5OH = 46.07 g/mol; H2O = 18.015 g/mol.

Step 2 — moles. Ethanol 46 ÷ 46.07 = 0.9985 mol; water 54 ÷ 18.015 = 2.9975 mol.

Step 3 — total. 0.9985 + 2.9975 = 3.9960 mol.

Step 4 — divide. Xethanol = 0.9985 ÷ 3.9960 = 0.2499; Xwater = 2.9975 ÷ 3.9960 = 0.7501.

Check. 0.2499 + 0.7501 = 1.0000. ✓

The mole fraction calculator gives these four-decimal values rather than the rounded 0.25/0.75, because it uses the exact IUPAC 2021 molar masses. It also reports the average molar mass of the mixture, ΣXiMi = 0.2499 × 46.07 + 0.7501 × 18.015 = 25.03 g/mol, and the mole percent (24.99 mol % ethanol).

Notice how different the mass and mole pictures are: the liquid is 46 % ethanol by mass but only 25 % by moles, because each ethanol molecule is 2.6 times heavier than a water molecule. That gap is the whole reason a mole fraction calculator exists.

Mole Fraction From Mass Percent

Given a composition by mass, take 100 g of mixture: the mass percent of each component is then its mass in grams. Convert each to moles and divide by the total. This is mode 2 of the mole fraction calculator.

Example — 40 wt % ethanol in water.

Ethanol: 40 ÷ 46.07 = 0.8682 mol. Water: 60 ÷ 18.015 = 3.3306 mol. Total 4.1988 mol.

Xethanol = 0.207, Xwater = 0.793.

Aqueous reagent wt % solute Msolute Xsolute Xwater
Concentrated H2SO49898.080.9000.100
Concentrated HCl3736.460.2250.775
Concentrated HNO37063.010.4000.600
Ammonia solution2817.030.2910.709
Vodka (ethanol)4046.070.2070.793
Seawater (as NaCl)3.558.440.01110.989

Every row was produced by mode 2 of the mole fraction calculator. The percentages must sum to 100; if they do not, the tool tells you rather than silently normalising.

Mass Percent and Molality From Mole Fraction

The reverse direction is mode 3 of the mole fraction calculator. For a binary mixture of solute A (mole fraction X) in solvent B, imagine exactly one mole of mixture: it contains X mol of A and (1 − X) mol of B.

Mass percent of A = X MA ÷ [X MA + (1 − X) MB] × 100

Molality of A = X ÷ [(1 − X) MB ÷ 1000] = 1000 X ÷ [(1 − X) MB]

Example — Xethanol = 0.200 in water. Mass % = 0.2 × 46.07 ÷ (9.214 + 0.8 × 18.015) = 9.214 ÷ 23.626 = 39.0 %. Molality = 1000 × 0.2 ÷ (0.8 × 18.015) = 13.88 mol/kg.

The molality formula is worth remembering in the other direction too: X = m ÷ (m + 1000 ÷ MB), which for water is m ÷ (m + 55.51). Our molality calculator covers that unit in full; the mole fraction calculator simply reports both numbers together.

mole fraction calculator method: convert each component mass to moles, sum the moles, divide each by the total, and confirm the fractions add to one
Mass → moles → total → fraction. The mole fraction calculator shows each arrow for every component.

More Worked Examples

1. Dry air — 78.08 % N2, 20.95 % O2, 0.93 % Ar, 0.04 % CO2 by volume

For an ideal gas, volume percent is mole percent, so yN2 = 0.7808, yO2 = 0.2095, yAr = 0.0093, yCO2 = 0.0004. Average molar mass = 0.7808 × 28.014 + 0.2095 × 31.998 + 0.0093 × 39.95 + 0.0004 × 44.01 = 28.96 g/mol. Mode 5 of the mole fraction calculator returns this together with the density at 25 °C and 1 atm, 1.18 g/L.

2. Sugar solution — 34.2 g sucrose in 90.0 g water

Sucrose 34.2 ÷ 342.30 = 0.0999 mol; water 90.0 ÷ 18.015 = 4.996 mol. Xsucrose = 0.0196, Xwater = 0.980. Molality 1.110 mol/kg; 27.5 % by mass.

3. One molal salt — 1.00 mol NaCl per 1000 g water

Water = 55.51 mol. XNaCl = 1 ÷ 56.51 = 0.0177 as formula units; if you count ions (2 mol), Xions = 2 ÷ 57.51 = 0.0348. State which you mean.

4. Three-component solvent — 50 g water, 30 g methanol, 20 g acetone

Moles: 2.776, 0.936, 0.344; total 4.056. X = 0.684, 0.231, 0.085. Sum 1.000. The mole fraction calculator handles all three in one pass and charts them side by side.

5. Oxygen tank mixture — 2.0 mol O2 + 8.0 mol N2 at 5.0 atm

yO2 = 0.20, yN2 = 0.80. Partial pressures 1.0 atm and 4.0 atm. Average M = 0.2 × 32.0 + 0.8 × 28.0 = 28.8 g/mol.

Raoult’s Law and Vapor Pressure

For an ideal solution the vapour pressure of each volatile component equals its mole fraction in the liquid times the vapour pressure of the pure liquid: PA = xA P°A. The total pressure is the sum, and the vapour composition follows from Dalton’s law: yA = PA ÷ Ptotal. Mode 4 of the mole fraction calculator does all of it.

Example — 39.0 g benzene + 46.0 g toluene at 25 °C (P° benzene 95.1 mmHg, toluene 28.4 mmHg).

Moles: benzene 39.0 ÷ 78.11 = 0.4993; toluene 46.0 ÷ 92.14 = 0.4992. xB = 0.500, xT = 0.500.

PB = 0.500 × 95.1 = 47.6 mmHg; PT = 0.500 × 28.4 = 14.2 mmHg; Ptotal = 61.8 mmHg.

Vapour: yB = 47.6 ÷ 61.8 = 0.77, yT = 0.23. The vapour is richer in the more volatile benzene — the principle of distillation.

For a non-volatile solute (sugar, salt) only the solvent contributes, so P = xsolvent P° and the lowering is ΔP = xsolute P°. Sucrose at X = 0.0196 in water at 25 °C (P° = 23.76 mmHg) lowers the vapour pressure by 0.465 mmHg to 23.29 mmHg; glucose at X = 0.1 ÷ 1.1 = 0.0909 lowers it by 2.16 mmHg. The vapor density calculator and the molar mass from gas density tool pick up where the vapour phase leaves off.

Dalton’s Law and Gas Mixtures

In a gas mixture — the domain of mode 5 of the mole fraction calculator — each component behaves as if it alone occupied the container, so its partial pressure is Pi = yi Ptotal. Because ideal gases occupy equal volumes per mole, volume fraction, mole fraction and pressure fraction are all the same number — which is why air is “21 % oxygen” whether you mean by volume, by moles or by pressure.

Gas in dry air Mole fraction y Partial pressure at 1 atm (kPa) Contribution to Mavg (g/mol)
N20.780879.1121.87
O20.209521.236.70
Ar0.00930.940.37
CO20.00040.040.02
Total1.0000101.3328.96

Mode 5 of the mole fraction calculator produces this table for any set of gases and any total pressure, and adds the density from ρ = P Mavg ÷ RT. Trace gases are better expressed in ppm; 0.04 % CO2 is about 420 ppm, and the ppm to ppb converter handles those units.

Average Molar Mass of a Mixture

The mole fraction is the natural weighting for an average molar mass: Mavg = Σ Xi Mi. That single number lets you treat a mixture as if it were a pure gas — in the ideal gas law, in effusion rates, in density calculations — and it is printed by modes 1 and 5 of the mole fraction calculator.

Air’s 28.96 g/mol is the famous case the mole fraction calculator reproduces; natural gas (mostly CH4 with some C2H6) comes to 17–19 g/mol, which is why it rises; carbon dioxide at 44 g/mol sinks. Note that a mass-weighted average gives a different and generally wrong number for gas laws; the mole-weighted average is the one that works. Our average molecular weight of a mixture tool goes deeper into both averages, and for polymers the number average is precisely a mole-fraction-weighted mean.

Reference Table: Common Mixtures in the Mole Fraction Calculator

Mixture Composition given Mole fractions Mavg (g/mol)
Ethanol–water46 g : 54 g0.250 : 0.75025.0
Azeotropic ethanol95.6 wt % ethanol0.895 : 0.10543.1
Dry air78.08 / 20.95 / 0.93 / 0.04 vol %0.7808 / 0.2095 / 0.0093 / 0.000428.96
Saturated air, 25 °CPH2O = 3.17 kPa of 101.3yH2O = 0.03128.6
Exhaled breath (approx.)78 / 16 / 4 / 1 % N2/O2/CO2/Ar0.78 / 0.16 / 0.04 / 0.0129.2
Nitrox 32 (diving)32 % O2, 68 % N20.32 : 0.6829.3
Natural gas (typical)90 % CH4, 6 % C2H6, 4 % N20.90 / 0.06 / 0.0417.4
Seawater (as NaCl)3.5 wt %0.0111 : 0.98918.5
Concentrated H2SO498 wt %0.900 : 0.10090.1
Benzene–toluene39 g : 46 g0.500 : 0.50085.1
1 molal sucrose1 mol per kg water0.0177 : 0.98223.8
Stoichiometric H2/O22 : 1 by moles0.667 : 0.33312.0

Each line can be reproduced in the mole fraction calculator with the appropriate mode; the last column is ΣXiMi from mode 1 or 5.

Mole Fraction vs Other Concentration Units

Unit Definition Dimension T-dependent? Best for
Mole fraction Xni / ntotalnoneNoRaoult, Dalton, thermodynamics, gases
Molarity Mmol / L solutionmol/LYesTitrations, lab dilutions
Molality mmol / kg solventmol/kgNoFreezing/boiling point changes
Mass fraction / wt %g / g totalnoneNoReagent labels, industry
Normality Neq / L solutioneq/LYesTitrimetry
ppm / ppbparts per 106 / 109 (mass or mole)noneNoTrace analysis, air quality

Mole fraction and mass fraction — both shown by the mole fraction calculator — are dimensionless, which is a frequent source of confusion: “50 % ethanol” means something quite different by mass (X = 0.28) and by moles (X = 0.50). Always say which. The mole fraction calculator prints mass percent and mole percent together so the two can never be mixed up in your notes. For the other units see the molarity calculator, normality calculator and percent composition calculator.

Properties of the Mole Fraction

  • Bounded: 0 ≤ X ≤ 1. A value outside that range is always an arithmetic error, and the mole fraction calculator flags it.
  • Sums to one: ΣXi = 1 for any mixture, which gives a built-in check.
  • Symmetric: no component is privileged; “solvent” is just the one with the largest X.
  • Intensive and invariant: unchanged by temperature, pressure or the size of the sample.
  • Additive over mixing of equal-mole batches but not over volumes — mixing 50 mL of ethanol with 50 mL of water gives neither X = 0.5 nor 100 mL.
  • Equal to volume fraction for ideal gases, and to partial-pressure fraction — the basis of Dalton’s law.

Mole Fraction in Colligative Properties

Vapour-pressure lowering is the colligative property written directly in the unit a mole fraction calculator produces: ΔP = Xsolute P°solvent. The other three — boiling point elevation, freezing point depression and osmotic pressure — are usually written in molality or molarity, but all of them are really statements about the mole fraction of solvent, and for dilute solutions m ≈ 55.51 Xsolute in water.

Example. 18.0 g glucose (0.0999 mol) in 180 g water (9.99 mol). Xglucose = 0.0099.

ΔP at 25 °C = 0.0099 × 23.76 = 0.235 mmHg.

Molality = 0.0999 ÷ 0.180 = 0.555 mol/kg; ΔTf = 1.86 × 0.555 = 1.03 °C; ΔTb = 0.512 × 0.555 = 0.28 °C.

Use mode 3 of the mole fraction calculator to turn any X into a molality, then the freezing point depression, boiling point elevation and osmotic pressure calculators for the temperature and pressure effects.

mole fraction calculator uses: distillation and Raoult's law, gas mixtures and partial pressures for diving and anaesthesia, and ideal-solution thermodynamics
Distillation, breathing-gas mixtures, atmospheric science and solution thermodynamics all run on mole fractions.

Who Uses a Mole Fraction Calculator

  • Students in general and physical chemistry, where mole fraction, Raoult’s law and Dalton’s law arrive together.
  • Chemical engineers who reach for a mole fraction calculator when designing distillation columns, absorbers and reactors, whose phase diagrams are plotted in x and y.
  • Diving and anaesthesia professionals working with partial pressures of oxygen, nitrogen and anaesthetic vapours.
  • Atmospheric and climate scientists, whose gas concentrations are mole fractions (ppm, ppb by mole).
  • Materials scientists and metallurgists describing alloys and solid solutions in atomic percent, which is mole percent.
  • Anyone converting a supplier’s mass percent to a composition that thermodynamics can use.

Full Walkthrough: An Exam Problem

“A solution contains 25.0 g of methanol (CH3OH) and 75.0 g of water. At 40 °C the vapour pressures of pure methanol and water are 265 and 55.3 mmHg. Calculate (a) the mole fraction of each component, (b) the total vapour pressure assuming ideal behaviour, (c) the mole fraction of methanol in the vapour.”

(a) Methanol 25.0 ÷ 32.04 = 0.780 mol; water 75.0 ÷ 18.015 = 4.163 mol; total 4.943 mol. xMeOH = 0.158, xH2O = 0.842.

(b) PMeOH = 0.158 × 265 = 41.9 mmHg; PH2O = 0.842 × 55.3 = 46.6 mmHg. Ptotal = 88.5 mmHg.

(c) yMeOH = 41.9 ÷ 88.5 = 0.473. Methanol is 16 % of the liquid but 47 % of the vapour.

Mode 1 of the mole fraction calculator gives (a); mode 4, with the two pure vapour pressures entered, gives (b) and (c) in the same result and charts the liquid and vapour compositions side by side.

A Short History

Long before any mole fraction calculator, John Dalton stated the law of partial pressures in 1801, before the concept of the mole existed, in terms of the “quantity” of each gas. François-Marie Raoult found in 1887 that the vapour-pressure lowering of a solution was proportional to the ratio of solute to solvent molecules — the mole fraction in all but name. Wilhelm Ostwald coined the word mole in the 1890s, and by the time G. N. Lewis introduced fugacity and the ideal solution (1901–1908) the mole fraction was the standard composition variable of solution thermodynamics.

IUPAC’s Green Book now calls it the amount fraction and gives the symbols x and y; the mole fraction calculator follows those conventions while keeping the name everyone uses.

Limits and Assumptions

  • Formula units, not ions. The mole fraction calculator counts NaCl as one particle. If a problem wants ions, multiply the solute moles by the van ‘t Hoff factor first.
  • Raoult’s law is ideal. Real mixtures deviate — ethanol–water positively, acetone–chloroform negatively — and azeotropes exist because of it. Mode 4 gives the ideal prediction.
  • Gas mode assumes ideal gases. At high pressure use the van der Waals equation calculator for corrections.
  • Volume percent equals mole percent only for gases. For liquids, convert volumes to masses with densities before using the mole fraction calculator.
  • Mass percents must sum to 100 in mode 2; the tool refuses to guess a missing component.

Practice Problems With Answers

Try each by hand, then confirm with the mole fraction calculator.

1. 2.0 mol A mixed with 3.0 mol B. Mole fraction of A?

Show answer

2.0 ÷ 5.0 = 0.40; XB = 0.60.

2. 36 g glucose in 90 g water. Xglucose?

Show answer

0.200 mol ÷ (0.200 + 4.996) = 0.0385.

3. 20 wt % NaOH in water. XNaOH?

Show answer

20 ÷ 40.00 = 0.500 mol; 80 ÷ 18.015 = 4.441 mol. 0.101.

4. Xurea = 0.05 in water. Molality?

Show answer

1000 × 0.05 ÷ (0.95 × 18.015) = 2.92 mol/kg.

5. A gas mixture is 0.30 mol He and 0.70 mol Ne at 2.0 atm. Partial pressures?

Show answer

He 0.30 × 2.0 = 0.60 atm; Ne 1.40 atm. Mavg = 0.3 × 4.00 + 0.7 × 20.18 = 15.3 g/mol.

6. Vapour pressure of water above a solution with Xwater = 0.95 at 25 °C (P° = 23.76 mmHg)?

Show answer

0.95 × 23.76 = 22.57 mmHg; lowering 1.19 mmHg.

7. Equal masses of hexane (86.18) and heptane (100.2). Xhexane?

Show answer

Per 100 g each: 1.160 and 0.998 mol. 0.538.

8. Liquid Xbenzene = 0.40 in toluene at 25 °C (P° 95.1 and 28.4 mmHg). ybenzene?

Show answer

PB = 38.0, PT = 17.0, total 55.1 mmHg. yB = 0.69.

9. Convert 2.00 mol/kg KCl(aq) to mole fraction of KCl.

Show answer

2.00 ÷ (2.00 + 55.51) = 0.0348.

10. A brass is 70 wt % Cu, 30 wt % Zn. Atomic (mole) percent copper?

Show answer

70 ÷ 63.55 = 1.102 mol; 30 ÷ 65.38 = 0.459 mol. 70.6 at % Cu.

Tips for Accurate Results

  • Convert every component to moles before dividing — the mole fraction calculator does this automatically from formulas. Dividing masses gives a mass fraction.
  • Add the fractions. If they do not make 1.000, a molar mass or a division is wrong.
  • Carry four significant figures in molar masses; the mole fraction calculator uses IUPAC 2021 values.
  • For gases, volume % = mole %. Enter volumes directly as if they were moles.
  • For liquids, never use volume %. Convert to mass with the density first.
  • Say whether ions or formula units are counted for electrolytes.

Common Mistakes

Mistake Effect Fix
Dividing by moles of solvent instead of total molesGives a mole ratio, not a fraction; can exceed 1Denominator is the sum of all components
Using masses directlyMass fraction, not mole fractionConvert to moles first
Forgetting the solvent’s molesX far too largeWater is 55.51 mol per kg
Liquid volume % treated as mole %Wrong for every liquidVolumes → masses → moles
Using x for the vapour in Raoult’s lawLiquid and vapour compositions confusedPi = xiP°i; yi = Pi/Ptotal
Percentages entered that sum to 98 or 102Fractions do not sum to 1Include every component; the mole fraction calculator checks this

How This Mole Fraction Calculator Is Different

Feature This mole fraction calculator Typical online tool
Up to five components, formulas parsed with IUPAC 2021 weights✓Two components, moles typed in
Mass % ↔ mole fraction ↔ molality in both directions✓✗
Raoult’s law with vapour composition and ΔP✓✗
Gas mixtures: partial pressures, average M, density✓✗
Step-by-step working, table and bar chart✓Number only
Copy, CSV, TXT, print, share, history, per-mode Reset✓Partial
Free, no sign-up, runs in the browser✓Varies

The mole fraction calculator is one of the free tools on this site. Others include the molecular weight calculator, atomic mass calculator, formula weight calculator, grams to moles calculator, stoichiometry calculator, chemical equation balancer, limiting reactant calculator, theoretical yield calculator, percent yield calculator, atom economy calculator, equivalent weight calculator, molar mass of hydrates calculator, exact mass calculator, monoisotopic mass calculator, isotopic mass calculator, average vs monoisotopic mass, empirical formula calculator, molecular formula calculator, combustion analysis calculator, degree of unsaturation calculator, oxidation number calculator, formal charge calculator, and the polymer tools — weight average, polydispersity index and viscosity molecular weight.

Where the Numbers Come From

The mole fraction calculator uses IUPAC 2021 standard atomic weights for every molar mass, the IUPAC definition of amount fraction, and the standard treatment of Raoult’s and Dalton’s laws:

Found an error? Our corrections policy explains how we handle reports; contact us or read about the site.

Exam Checklist

☐ Every component converted to moles (including the solvent)

☐ Total moles = sum of all components

☐ Each X = ni ÷ ntotal; all between 0 and 1

☐ Fractions sum to 1.000

☐ Liquid (x) and vapour (y) fractions kept separate

☐ Raoult: Pi = xiP°i; Dalton: Pi = yiPtotal

☐ Ions vs formula units stated for electrolytes

☐ Answer dimensionless; mol % if requested

☐ Significant figures match the data

Frequently Asked Questions

What is the formula for mole fraction?

XA = moles of A ÷ total moles of all components. Convert each mass to moles with its molar mass, add them, divide. The fractions of all components sum to 1.

Does mole fraction have units?

No. It is moles divided by moles, a pure number between 0 and 1. Multiply by 100 for mole percent.

How do I convert mass percent to mole fraction?

Take 100 g of mixture so each percent is a mass in grams, divide each by its molar mass to get moles, sum, and divide each by the sum. Mode 2 of the mole fraction calculator does this for up to five components.

How is mole fraction related to molality?

For solute A in solvent B: m = 1000 XA ÷ [(1 − XA) MB], and XA = m ÷ (m + 1000 ÷ MB). In water 1000 ÷ 18.015 = 55.51, so X = m ÷ (m + 55.51).

Is mole fraction the same as volume fraction?

For ideal gases, yes — equal volumes contain equal moles. For liquids and solids, no; convert volumes to masses with densities, then to moles.

What is the mole fraction of oxygen in air?

About 0.2095 in dry air (20.95 mol %), giving a partial pressure of 21.2 kPa at sea level. Nitrogen is 0.7808, argon 0.0093, carbon dioxide about 0.0004.

How does the mole fraction calculator handle Raoult’s law?

Mode 4 takes each component’s amount and pure vapour pressure, computes xi, multiplies to get each partial pressure, sums to the total, and reports the vapour mole fractions yi = Pi ÷ Ptotal and the lowering ΔP for non-volatile solutes.

Can a mole fraction be greater than 1?

Never. If you get one, you divided by the moles of one component instead of the total — that is a mole ratio, a different quantity.

Why does the ethanol example give 0.2499 rather than 0.25?

Because 46 g of ethanol is 0.9985 mol with the exact molar mass 46.07 g/mol, not 1.000 mol. The mole fraction calculator uses IUPAC 2021 values throughout; round at the end if your course uses whole-number molar masses.

Is my data stored anywhere?

No. The mole fraction calculator runs entirely in your browser; the history box uses your own local storage and Clear All empties it.

10 Facts Worth Knowing

  1. The mole fraction of water in pure water is 1, and in 98 % sulfuric acid it is still 0.10 — one water molecule for every nine acid molecules.
  2. Dry air’s average molar mass, 28.96 g/mol, is a mole-fraction-weighted mean; the mass-weighted mean would be 29.1 and would give the wrong gas density.
  3. Atmospheric CO2 at 420 ppm is a mole fraction of 0.00042.
  4. Volume percent and mole percent coincide only for ideal gases — Avogadro’s law in disguise.
  5. An azeotrope is a mixture whose liquid and vapour mole fractions are identical, so distillation cannot change it; ethanol–water’s is at xethanol = 0.895.
  6. Metallurgists’ “atomic percent” is mole percent under another name.
  7. Raoult received the Davy Medal in 1892 for the vapour-pressure work that made the mole fraction central to solution chemistry.
  8. Divers’ nitrox mixes are specified by the oxygen mole fraction; “EAN32” is yO2 = 0.32.
  9. A 1 molal aqueous solution has Xsolute = 0.0177, whatever the solute.
  10. The mole fraction calculator refuses percentages that do not sum to 100, because a missing component makes every fraction wrong.

Final Thoughts

The mole fraction is the purest way to describe a mixture: no units, no reference volume, just the share of particles that belong to each component. It is the variable Raoult’s and Dalton’s laws are written in, the weighting behind every average molar mass, and the bridge between a supplier’s mass percent and the thermodynamics you actually need.

Use the mole fraction calculator above to convert masses, percentages and molalities into fractions, to predict vapour pressures and vapour compositions, and to analyse gas mixtures — and check that the fractions sum to 1 every time. That habit alone catches most errors before they reach the answer line.

AR

Written by

Ahmad Raza, M.Phil. Chemistry ✓ Verified Expert

Ahmad has taught general and physical chemistry for over a decade and builds the calculators on this site. He tests every tool — including this mole fraction calculator — against textbook problems and published data before it goes live, and he answers reader questions personally.

contact@molecularweightcalculator.org  ·  About the author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top