My Calculator

Mole Fraction Calculator

Find the mole fraction of every component in a mixture from mass and molar mass, convert mole fraction to molality, molarity, and mass percent for a binary solution, and calculate vapor pressure with Raoult's Law, all with step-by-step working.

⚗ Mixture setup

Select a calculation, then enter the known values.

Formula in usexᵢ = nᵢ ÷ (n₁ + n₂ + … + nₙ), where nᵢ = massᵢ ÷ molar massᵢ
⚗ Result

Total moles in mixture

5.2115mol

Formula used: xᵢ = nᵢ ÷ (n₁ + n₂ + … + nₙ), where nᵢ = massᵢ ÷ molar massᵢ

ComponentMolesMole fractionMole %Mass %
Water4.994450.9583595.835%90%
Ethanol0.217060.041654.165%10%
Lab note: This 2-component mixture has a total of 5.21151 mol, and every mole fraction listed above sums to 1 (100 mole percent).

Mole Fraction Composition

Each bar shows a component's share of the total moles present — every bar together adds up to 1 (100%).

Live calculation
Water0.9583Ethanol0.0417

Step-by-Step Mole Fraction Calculation

Here's exactly how this answer was calculated, one step at a time.

Given: 2 components: Water = 90 g, M = 18.02 g/mol; Ethanol = 10 g, M = 46.07 g/mol

  1. Step 1: Convert every component's mass to moles

    Moles = mass ÷ molar mass for each component in the mixture.

    n(Water) = 90 ÷ 18.02 = 4.99445 mol | n(Ethanol) = 10 ÷ 46.07 = 0.21706 mol
  2. Step 2: Add up the total moles

    n(total) = 4.99445 + 0.21706 = 5.21151 mol
  3. Step 3: Divide each component's moles by the total

    The mole fraction of a component is its share of the total moles present, not its share of the total mass.

    xᵢ = nᵢ ÷ (n₁ + n₂ + … + nₙ), where nᵢ = massᵢ ÷ molar massᵢ
  4. Step 4: Report the result

    x(Water) = 0.95835 | x(Ethanol) = 0.04165

Calculated result:

5.2115 mol

Mole Fraction Calculator: Find Mixture Composition Online

This free mole fraction calculator finds the mole fraction of every component in a mixture straight from mass and molar mass, converts a solute's mole fraction into molality, molarity, and mass percent for a binary solution, and works out vapor pressure using Raoult's Law, all in one place. It is built for general chemistry and physical chemistry students, lab technicians preparing solutions, and anyone who needs to move between concentration units without digging through a textbook appendix.

Pick the calculation you need, type in the values you have, and the tool shows the answer with a complete step-by-step working underneath. There is nothing to download and nothing to sign up for. Everything runs directly in your browser, so your numbers stay private and the result updates instantly as you type.

What Is Mole Fraction?

Mole fraction (usually written as x) is the ratio of the number of moles of one component to the total number of moles of every component in a mixture. Unlike mass percent or ppm, mole fraction compares particles to particles rather than mass to mass, which makes it the natural unit whenever a formula cares about how many molecules of each substance are actually present, not how heavy they are.

Mole fraction is always a number between 0 and 1, and the mole fractions of every component in a mixture always add up to exactly 1. Multiplying a mole fraction by 100 gives mole percent, a more intuitive way to say the same thing — a mole fraction of 0.25 is the same as saying 25 mole percent of the mixture's particles belong to that component.

Mole Fraction Formula

For any component i in a mixture, the mole fraction formula is xᵢ = nᵢ ÷ (n₁ + n₂ + n₃ + … + nₙ), where nᵢ is the number of moles of that component and the denominator is the total moles of everything in the mixture, including the component itself. If moles aren't given directly, find them first with nᵢ = massᵢ ÷ molar massᵢ.

This calculator's mixture mode handles this for any number of components from two up to eight. Enter each component's name, mass, and molar mass, and it automatically works out the moles, mole fraction, mole percent, and mass percent of every single one, with a running check that all the mole fractions add up to 1.

How to Calculate Mole Fraction Step by Step

Start by converting every component's mass into moles using moles = mass ÷ molar mass. Add all of those mole values together to get the total moles in the mixture. Then divide each component's individual mole count by that total to get its mole fraction. Repeat the division for every component, and the results should always sum to 1 if the arithmetic is correct.

For example, mixing 90 g of water (molar mass 18.02 g/mol) with 10 g of ethanol (molar mass 46.07 g/mol) gives 90 ÷ 18.02 ≈ 4.995 mol of water and 10 ÷ 46.07 ≈ 0.217 mol of ethanol, for a total of about 5.212 mol. The mole fraction of water is then 4.995 ÷ 5.212 ≈ 0.958, and the mole fraction of ethanol is 0.217 ÷ 5.212 ≈ 0.042 — together adding to 1.

Mole Fraction vs Mass Percent vs Molarity vs Molality

Mole fraction, mass percent, molarity, and molality are four different ways of describing the same solution, and none of them is automatically 'more correct' — each is convenient for a different situation. Mass percent compares mass to mass and doesn't need any density or molar mass information once you have the two masses. Molarity is moles of solute per litre of solution and needs the solution's density to convert mass into volume. Molality is moles of solute per kilogram of solvent (not solution) and is popular for colligative-property calculations because it doesn't change with temperature, unlike molarity.

Mole fraction is the one physical chemists reach for most often, because it appears directly in Raoult's Law, Henry's Law, and ideal-gas partial-pressure relationships without any conversion factors. This calculator's convert mode moves a two-component solute-and-solvent system between all four of these units in one step, so you never have to chain several separate calculators together.

Converting Mole Fraction to Molality

To turn a solute's mole fraction into molality, first find the moles of solute and solvent from their masses and molar masses, exactly as in the mixture calculation above. Molality is then simply the moles of solute divided by the mass of the solvent in kilograms: molality = n(solute) ÷ kg(solvent). Notice that molality only needs the solvent's mass, not the total solution mass or its density, which is exactly why it stays constant even if the solution's volume changes with temperature.

This calculator's convert mode runs this calculation automatically alongside the mole fraction, so you can see both concentration units for the same solution side by side, without needing to look up or re-derive the relationship between them.

Converting Mole Fraction to Molarity

Molarity needs one extra piece of information that mole fraction and molality don't: the solution's density. Once you know the total mass of the solution (solute mass plus solvent mass) and its density, you can find the total volume with volume (L) = total mass (g) ÷ density (g/mL) ÷ 1,000. Molarity is then moles of solute divided by that volume in litres: molarity = n(solute) ÷ volume (L).

Because density depends on concentration, temperature, and the specific substances involved, there's no shortcut formula that skips this step — an accurate density value (from a reference table or a direct measurement) is always required to convert to molarity correctly. This calculator's convert mode includes a density field for exactly this reason, and simply leaves molarity out of the results if no density is entered.

Raoult's Law and Vapor Pressure

Raoult's Law is one of the most common places mole fraction shows up outside a concentration table. It states that the partial vapor pressure of each volatile component in an ideal solution equals its mole fraction in the liquid times its own pure vapor pressure: Pᵢ = xᵢ × P°ᵢ. Adding up the partial pressures of every component gives the solution's total vapor pressure, and dividing any one partial pressure by that total gives the mole fraction of that component in the vapor phase above the solution.

For example, a solution with xₐ = 0.4, a pure vapor pressure for A of 115 mmHg, and a pure vapor pressure for B of 40 mmHg gives a partial pressure of 0.4 × 115 = 46 mmHg for A and 0.6 × 40 = 24 mmHg for B, for a total vapor pressure of 70 mmHg. The vapor above the solution is then 46 ÷ 70 ≈ 65.7% component A, noticeably richer in A than the 40% found in the liquid — the more volatile component always concentrates in the vapor phase. This calculator's Raoult's Law mode runs this full calculation, including the vapor-phase mole fraction.

Why Mole Fraction Is Useful

Mole fraction matters wherever a formula depends on the number of particles rather than their mass, which is common across physical chemistry. Colligative properties like boiling point elevation, freezing point depression, and osmotic pressure all ultimately trace back to particle counts, and mole fraction is the cleanest way to express that. Raoult's Law and Henry's Law, used to predict vapor pressures and gas solubility, are written directly in terms of mole fraction.

Mole fraction is also unit-independent and doesn't change with temperature, unlike molarity, which makes it a more stable reference point for reporting a mixture's composition in engineering, thermodynamics, and industrial gas-blending calculations, where temperature and pressure often vary throughout a process.

Common Mistakes When Calculating Mole Fraction

The most frequent mistake is dividing by total mass instead of total moles, which actually gives mass fraction, a related but different quantity. Mole fraction always uses moles in both the numerator and the denominator. A second common mistake is forgetting to include every component (including the solvent) in the denominator — the mole fraction of a solute is its moles divided by the total moles of the entire mixture, not just the moles of solute alone.

A third mistake is mixing up molality's kilograms-of-solvent basis with molarity's litres-of-solution basis, which are not interchangeable without a density conversion. It also helps to double-check that all the mole fractions in a finished calculation sum to 1 (or 100 mole percent) — if they don't, a molar mass or a mass value was likely entered incorrectly somewhere.

Mole Fraction Calculator FAQ and Quick Reference

xᵢ = nᵢ ÷ (n₁ + n₂ + … + nₙ), where nᵢ = massᵢ ÷ molar massᵢ. All mole fractions in a mixture sum to 1. Molality = n(solute) ÷ kg(solvent). Molarity = n(solute) ÷ volume(L), where volume needs the solution's density. Raoult's Law: Pᵢ = xᵢ × P°ᵢ, and total vapor pressure = the sum of every component's partial pressure.

This free mole fraction calculator is meant for study, homework checking, and general lab reference use. Always double-check molar mass values and units before relying on a result, and for safety-critical or regulatory work, confirm your final numbers against an official reference, a lab report, or a qualified professional.

Frequently Asked Questions

What is mole fraction?

Mole fraction is the ratio of the number of moles of one component to the total number of moles of every component in a mixture. It is always between 0 and 1, and every component's mole fraction in a mixture adds up to 1.

What is the formula for mole fraction?

xᵢ = nᵢ ÷ (n₁ + n₂ + … + nₙ), where nᵢ is the moles of component i and the denominator is the total moles of every component in the mixture.

How do I calculate mole fraction from mass?

First convert each component's mass to moles using moles = mass ÷ molar mass, then divide each component's moles by the total moles of the mixture.

How do I convert mole fraction to molality?

Find the moles of solute and the mass of solvent in kilograms, then use molality = n(solute) ÷ kg(solvent).

How do I convert mole fraction to molarity?

You need the solution's density. Find the total solution mass, convert it to volume using volume (L) = mass (g) ÷ density (g/mL) ÷ 1,000, then divide the moles of solute by that volume.

Do mole fractions always add up to 1?

Yes. Since mole fraction is each component's share of the total moles in a mixture, adding every component's mole fraction together always equals exactly 1 (100 mole percent).

What is Raoult's Law?

Raoult's Law states that a component's partial vapor pressure above an ideal solution equals its mole fraction in the liquid times its pure vapor pressure: Pᵢ = xᵢ × P°ᵢ. Adding up every component's partial pressure gives the total vapor pressure.

Is mole fraction the same as mole percent?

Mole percent is just mole fraction multiplied by 100. A mole fraction of 0.3 is the same as 30 mole percent.