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
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
This tool covers two components. If your mixture has three or more, one workaround is to lump the extras into a single group, as long as you only want that group's share. Mole fractions are the starting point for partial pressures in gas mixtures and for Raoult's law in solutions, but they are not mass fractions, so a heavy component with few moles can dominate the weight. Which kind of mixture are you describing?