Mole Fraction Calculator
Find the mole fraction of a mixture component.
Result
How it is calculated
This tool handles a mixture of exactly two components. You enter the amount of each in moles, and it computes xA = nA / (nA + nB) and xB = nB / (nA + nB). Both results are dimensionless and shown with four decimals; they always add up to 1.
Amounts cannot be negative, and the total must be above zero, otherwise there is no result. If you have grams rather than moles, divide each mass by its molar mass first (the tool does not do this). For three or more components, divide each component's moles by the sum of all of them yourself.
Worked example
A mixture contains 2 mol of component A and 6 mol of component B. Total moles: 2 + 6 = 8. Then xA = 2 ÷ 8 = 0.2500 and xB = 6 ÷ 8 = 0.7500. Check: 0.2500 + 0.7500 = 1. If the total pressure were 4 atm and the mixture were an ideal gas, component B's partial pressure would be 0.75 × 4 = 3 atm.
Common mistakes
- Entering grams instead of moles. Convert each mass using its molar mass before using the tool.
- Dividing by the other component's moles instead of the total, which gives a ratio (here 2/6) rather than a fraction.
- Confusing mole fraction with mass fraction or mole percent; multiply by 100 yourself if you need percent.
- Leaving out a component and so understating the total: for a three-component mixture this two-component tool gives wrong fractions.
- Using volume or molarity in place of moles; only the amount of substance counts.
About this calculator
Mole fraction expresses the composition of a mixture as xᵢ = nᵢ / n_total — the moles of one component divided by the total moles of all components in the mixture. Unlike mass percent or molarity, it's a dimensionless ratio that always sums to 1 across every component, which makes it the natural unit for describing gas and liquid mixtures in thermodynamic equations.
Chemists and chemical engineers rely on mole fraction in Raoult's law (a component's vapor pressure equals its mole fraction times the pure-liquid vapor pressure) and Dalton's law of partial pressures (partial pressure equals mole fraction times total pressure), both central to distillation design, phase-equilibrium calculations, and gas-mixture analysis. Students use it in stoichiometry and physical chemistry labs whenever a problem calls for composition independent of volume or mass.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)