Skip to main content
Skip to calculator
Advertisement

Last updated: July 3, 2026

Mole Fraction Calculator

Quick Answer

This mole fraction calculator computes x_i = n_i/Σn_i for binary or three-component mixtures, converting masses to moles when molar masses are supplied and reporting mole percent and total moles.

Mole fraction is the moles of one component divided by the total moles of all components. For example, 2 moles A and 3 moles B gives x A equal to 0.4 and x B equal to 0.6.

Key Takeaways

  • Mole fraction is x_i = n_i/n_total.
  • All mole fractions in a complete mixture sum to 1.
  • Mole percent equals mole fraction multiplied by 100.
  • Mass inputs must be converted to moles before taking fractions.
  • For binary mixtures, x_B = 1 − x_A.
Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

x_i = n_i / n_total; n_total = Σn_i; n = mass / molar mass

Where:

  • x_i=Mole fraction of component i(dimensionless)
  • n_i=Moles of component i(mol)
  • n_total=Total moles of all mixture components(mol)
  • m=Mass of a component(g)
  • M_w=Molar mass of that component(g/mol)
Mole Fraction — Component Moles Divided by Total MolesComponent A and component B particles combine into a mixture. The formula box shows x sub i equals n sub i divided by total moles, and mole percent equals one hundred times x.Mole Fraction = Component Moles ÷ Total MolesComponent AnA = 2 molComponent BnB = 3 molcombineMixture totalntotal = 5 molxA = nA / ntotal = 2 / 5 = 0.40Mole percent A = 100 × xA = 40%
Mole Fraction Calculator — component moles divided by total moles

Worked Examples

Binary mixture from moles

Component A has 2 mol and component B has 3 mol.

  1. 1Add component moles: n_total = 2 mol + 3 mol = 5 mol.
  2. 2Divide A by the total: x_A = 2 ÷ 5 = 0.4.
  3. 3For a binary mixture, x_B = 1 − x_A = 0.6.
Final Answer: 0.4 dimensionless

Water and ethanol from masses

18 g water (18.015 g/mol) mixed with 46 g ethanol (46.07 g/mol).

  1. 1Convert water to moles: 18 ÷ 18.015 ≈ 0.999 mol.
  2. 2Convert ethanol to moles: 46 ÷ 46.07 ≈ 0.9985 mol.
  3. 3Compute x_water = 0.999 ÷ (0.999 + 0.9985) ≈ 0.500.
Final Answer: 0.5 dimensionless

Three-component mixture

Three components have 1 mol, 1 mol, and 2 mol respectively.

  1. 1Add all moles: n_total = 1 + 1 + 2 = 4 mol.
  2. 2Component C fraction is x_C = 2 ÷ 4 = 0.5.
  3. 3The three mole fractions sum to 0.25 + 0.25 + 0.5 = 1.
Final Answer: xC = 0.5 dimensionless

Introduction

Mole fraction is a dimensionless way to describe mixture composition: it compares the moles of one component with the total moles of all components. This calculator finds x_A, x_B, optional x_C, mole percent, and total moles from direct mole inputs or from mass and molar mass. Mole fraction is the natural composition unit in gas mixtures, liquid solutions, colligative properties, and vapor-liquid calculations such as Raoult's law. It complements concentration tools like the molarity calculator while following IUPAC amount-of-substance terminology from the Gold Book.

What is mole fraction?

The mole fraction of component i, written x_i, is n_i divided by the sum of moles of every component in the mixture. Because both numerator and denominator are measured in moles, the unit cancels and the result is dimensionless. A mole fraction of 0.40 means 40% of the molecules or formula units counted by amount are component i.

  • x_i always lies between 0 and 1 for a physically valid mixture.

  • The complete set of mole fractions sums to 1.

  • Mole percent is simply mole fraction multiplied by 100.

  • Mole fraction is independent of the masses of molecules once moles are known.

Mole fraction formula explained

Use x_i = n_i/n_total. For a binary mixture, x_A = n_A/(n_A+n_B) and x_B = n_B/(n_A+n_B), so x_B = 1 − x_A. If you start from a weighed mass, first convert it to moles with n = mass/molar mass. The calculator performs this conversion separately for A, B, and optional C, then normalizes by the total moles.

Use consistent amount units. Direct mole entries override mass-derived moles for the same component.

How to calculate mole fraction

Manual calculation is straightforward but requires including every component that contributes moles to the mixture.

  • List all components in the mixture.

  • Enter or calculate the moles of each component.

  • Add them to get total moles.

  • Divide the selected component moles by total moles.

  • Multiply by 100 if mole percent is requested.

Useful binary-mixture reference values

These examples show how mole fractions map to intuitive mixture ratios. Equal moles always give equal mole fractions, even if the masses are very different.

n_An_Bx_Ax_B
1 mol1 mol0.50.5
2 mol3 mol0.40.6
1 mol4 mol0.20.8
0.999 mol0.9985 mol≈0.500≈0.500

Where mole fraction is used

Mole fraction appears directly in Dalton's law for gas mixtures, ideal-solution vapor pressures, activity models, and colligative-property relationships. For gas pressure work, the partial pressure calculator uses x_i with total pressure. For solution concentration by solvent mass, compare with the molality calculator. External introductions from LibreTexts and NIST Chemistry WebBook provide additional context and property data.

Common mistakes and limitations

Do not use mass fraction in place of mole fraction; heavy components can dominate mass while contributing fewer moles. Do not omit trace components when their mole fraction matters for pressure, vapor, or equilibrium calculations. In non-ideal mixtures, mole fraction is still a composition variable, but activity coefficients may be needed to predict real behavior.

After calculating all components, check that the mole fractions sum to 1 within rounding.

Quick Reference Card

Mole Fraction Quick Reference

Quick referenceMole Fraction Calculator

x_i = n_i / Σn_i; mole percent = 100x_i

Valid range: 0 ≤ x_i ≤ 1, with Σx_i = 1 for a complete mixture

Common Values

Equal binary amountsx_A = x_B = 0.5
2 mol A + 3 mol Bx_A = 0.4, x_B = 0.6
Trace component0 < x_i ≪ 1
Pure componentx_i = 1

Watch Out

  • Do not divide by the number of components; divide by total moles.
  • Do not use grams directly unless all masses are first converted to moles.
  • Include all mixture components in n_total.
  • Rounding can make displayed fractions sum to 0.999 or 1.001.

Pro Tips

  • For a binary system, compute one fraction and subtract from 1 for the other.
  • Use mole percent when communicating composition as a percentage.
  • Check molar masses from reliable sources before mass-based calculations.
  • Pair mole fraction with activity coefficients for non-ideal solution predictions.

FAQs

What does mole fraction mean?

Mole fraction is the moles of one component divided by the total moles in the mixture. It is dimensionless and tells what fraction of the counted chemical amount belongs to that component.

How do I calculate mole fraction from grams?

Convert each component's mass to moles using n = mass ÷ molar mass. Add all component moles, then divide the selected component moles by that total.

What is mole percent?

Mole percent is mole fraction multiplied by 100. For example, x_A = 0.4 corresponds to 40 mol%.

Do mole fractions always sum to 1?

Yes. For a complete mixture description, all component mole fractions add to 1, allowing for small rounding differences.

Is mole fraction the same as mass fraction?

No. Mole fraction compares moles, while mass fraction compares masses. They are only numerically similar in special cases where components have similar molar masses and amounts.

Why is mole fraction useful for gases?

For ideal gas mixtures, partial pressure is proportional to mole fraction: P_i = x_iP_total. That makes mole fraction the natural composition unit for Dalton's law.