# What is the mole fraction?

Finds the mole fraction and mole percent of each component of a mixture or solution from its moles, or from its mass and molar mass: X = moles of the component ÷ total moles.

- Page: https://www.acalculator.org/chemistry/mole-fraction-calculator
- JSON spec: https://www.acalculator.org/chemistry/mole-fraction-calculator.json
- Version: fc4d526c3f18

## Default answer

Example with the default inputs (Components [Name Ethylene glycol, Mass (g) 2,220, Molar mass (g/mol) 62.07; Name Water, Mass (g) 2,000, Molar mass (g/mol) 18.02]): The mole fraction of Ethylene glycol is 0.243715.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| parts | Components | One row per component: its name, and its moles or its mass in grams with its molar mass in g/mol. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Mole fraction of the first component | X of the first row, to 6 significant figures. |
| first | X (first component) | The mole fraction of the first row. |
| percent | Mole percent (first component) | The first row’s mole fraction × 100. |
| all | Every component | Each component’s mole fraction and mole percent. |
| moles | Moles of each | Each component’s amount in moles. |
| total | Total moles | The moles of all the components added up. |
| firstName | First component | The name of the first row. |

## Method

X_A = n_A ÷ (n_A + n_B + …), where each n is typed in moles or is mass (g) ÷ molar mass (g/mol); mole percent = 100 × X.

## Assumptions

- Every component of the mixture is listed; the fractions add up to 1.
- A row with moles uses them; a row without moles needs both its mass and its molar mass.

## Worked examples

1. parts = {"name":"Ethylene glycol","g":2220,"mm":62.07} or {"name":"Water","g":2000,"mm":18.02} gives first = 0.243715, result = X = 0.243715. Source: OpenStax, Chemistry 2e, §11.4 Colligative Properties (mole fraction X_A = mol A ÷ total mol of all components), https://openstax.org/books/chemistry-2e/pages/11-4-colligative-properties, Example 11.3 (a): X(ethylene glycol) = 0.244.
2. parts = {"name":"Ammonia","g":0.85,"mm":17.03} or {"name":"Water","g":125,"mm":18.02} gives first = 0.007144. Source: OpenStax, Chemistry 2e, §11.4 Colligative Properties (mole fraction X_A = mol A ÷ total mol of all components), https://openstax.org/books/chemistry-2e/pages/11-4-colligative-properties, Check Your Learning after Example 11.3: X(NH₃) = 7.14 × 10⁻³.
3. parts = {"name":"Ethanol","n":4} or {"name":"Glycerin","n":1} gives first = 0.8, all = Ethanol: 0.8 (80%); Glycerin: 0.2 (20%), total = 5. Source: OpenStax, Chemistry 2e, §11.4 Colligative Properties (mole fraction X_A = mol A ÷ total mol of all components), https://openstax.org/books/chemistry-2e/pages/11-4-colligative-properties, Example 11.6: 4.000 mol ethanol and 1.00 mol glycerin, X(ethanol) = 0.800.
4. parts = {"name":"Oxygen","n":2.83} or {"name":"Nitrous oxide","n":8.41} gives first = 0.251779, percent = 25.177936. Source: OpenStax, Chemistry 2e, §9.3 Stoichiometry of Gaseous Substances, Mixtures, and Reactions (X_A = n_A ÷ n_Total), https://openstax.org/books/chemistry-2e/pages/9-3-stoichiometry-of-gaseous-substances-mixtures-and-reactions, Example 9.15: X(O₂) = 2.83 ÷ 11.24 = 0.252.

## FAQ

### How do I calculate the mole fraction?

Divide the moles of one component by the moles of all the components together: X_A = n_A ÷ n_total. In a solution of 35.77 mol ethylene glycol and 110.99 mol water, X(glycol) = 35.77 ÷ 146.75 = 0.2437.

### What is mole percent?

The mole fraction times 100. A mole fraction of 0.2518 is 25.18 mol %: about a quarter of the molecules in the mixture belong to that component.

### How do I get moles from grams?

Divide the mass by the molar mass: 2,220 g of ethylene glycol ÷ 62.07 g/mol = 35.77 mol. Leave the moles box empty and type the mass and molar mass, and the page does this for that row.

### Do the mole fractions add up to 1?

Yes, when every component is listed: the fractions of all the components add up to exactly 1, and the mole percents to 100%. A missing component makes the others too large.

### How is mole fraction different from molarity and molality?

Mole fraction compares moles with moles, so it has no units. Molarity divides the moles of solute by the volume of solution (mol/L), and molality by the mass of solvent (mol/kg).

### What is the mole fraction used for?

Dalton’s law gives a gas’s partial pressure as its mole fraction times the total pressure, and Raoult’s law gives a solution’s vapor pressure as the solvent’s mole fraction times the pure solvent’s vapor pressure: 0.800 × 0.178 atm = 0.142 atm for ethanol with glycerin.

## Sources

- OpenStax, Chemistry 2e, §11.4 Colligative Properties: mole fraction X_A = mol A ÷ total mol of all components, Example 11.3 (2.22 × 10³ g ethylene glycol in 2.00 × 10³ g water: X = 0.244) and its Check Your Learning (0.850 g NH₃ in 125 g water: 7.14 × 10⁻³), Example 11.6 (4.000 mol ethanol and 1.00 mol glycerin: X(ethanol) = 0.800, 0.142 atm). https://openstax.org/books/chemistry-2e/pages/11-4-colligative-properties (retrieved 2026-10-19)
- OpenStax, Chemistry 2e, §9.3 Stoichiometry of Gaseous Substances, Mixtures, and Reactions: X_A = n_A ÷ n_Total, P_A = X_A × P_Total, Example 9.15 (2.83 mol O₂ and 8.41 mol N₂O: X(O₂) = 0.252). https://openstax.org/books/chemistry-2e/pages/9-3-stoichiometry-of-gaseous-substances-mixtures-and-reactions (retrieved 2026-10-19)
