# How many moles are in my sample?

Converts between mass, moles and number of particles: n = m ÷ M and N = n × Avogadro’s number, with the molar mass from a chemical formula or typed in.

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

## Default answer

Example with the default inputs (Molar mass from A formula, Chemical formula H2O, What do you know? Mass, Mass 36.03 g): 2 mol, 36.03 g and 1.20443 × 10²⁴ particles at 18.015 g/mol.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| src | Molar mass from | Work the molar mass out from a chemical formula, or type it in g/mol. |
| f | Chemical formula | The substance, such as H2O, NaCl or C6H12O6. Element symbols start with a capital letter. |
| M | Molar mass (g/mol) | The mass of one mole of the substance, in grams per mole. |
| k | What do you know? | The mass of the sample, the amount in moles, or the number of particles. |
| m | Mass | The mass of the sample. |
| n | Amount (mol) | The amount of substance in moles. |
| N | Number of particles | How many atoms, molecules or formula units, such as 6.022e23. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| molesOut | Moles | The amount of substance: mass in grams ÷ molar mass, or particles ÷ Avogadro’s number. |
| grams | Mass | Moles × molar mass, in grams. |
| count | Particles | Moles × Avogadro’s number, 6.02214076 × 10²³ per mole. |
| countText | Particles (scientific) | The number of particles as d.ddddd × 10ⁿ. |
| molar | Molar mass | The molar mass used, in grams per mole. |
| formulaText | Formula | The formula as read, with subscripts. |

## Method

n = m ÷ M (mass in grams over molar mass in g/mol); m = n × M; N = n × N_A with N_A = 6.02214076 × 10²³ per mole exactly; M = Σ atoms × CIAAW standard atomic weight.

## Assumptions

- Atomic weights are the CIAAW abridged standard atomic weights (2024), the values printed on most periodic tables.
- Avogadro’s number is the exact SI value 6.02214076 × 10²³ per mole.
- Particles means whatever one formula unit is: atoms for an element, molecules for a compound such as H₂O.

## Worked examples

1. src = formula, f = H2O, k = mass, m = 0.03603 gives molar = 18.015, molesOut = 2, count = 1,204,428,152,000,000,000,000,000, countText = 1.20443 × 10²⁴. Source: CIAAW, Abridged Standard Atomic Weights (H 1.0080, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm; × 6.02214076 × 10²³ (BIPM, SI Brochure 9th edition) = 1.204428152 × 10²⁴.
2. src = formula, f = NaCl, k = moles, n = 0.5 gives molar = 58.44, grams = 29.22. Source: CIAAW, Abridged Standard Atomic Weights (Na 22.990, Cl 35.45), https://ciaaw.org/abridged-atomic-weights.htm.
3. src = formula, f = C6H12O6, k = mass, m = 0.09 gives molar = 180.156, molesOut = 0.499567. Source: OpenStax, Chemistry 2e, §3.1 Formula Mass and the Mole Concept (grams to moles), https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept.
4. src = typed, M = 12.011, k = particles, N = 301,107,038,000,000,000,000,000 gives molesOut = 0.5, grams = 6.0055. Source: BIPM, SI Brochure 9th edition (2019), N_A = 6.02214076 × 10²³ mol⁻¹, https://www.bipm.org/en/publications/si-brochure.
5. src = formula, f = CO2, k = mass, m = 0.1 gives molar = 44.009, molesOut = 2.272262. Source: CIAAW, Abridged Standard Atomic Weights (C 12.011, O 15.999), https://ciaaw.org/abridged-atomic-weights.htm.

## FAQ

### How do I convert grams to moles?

Divide the mass in grams by the molar mass in g/mol: n = m ÷ M. Water has M = 18.015 g/mol, so 36.03 g of water is 36.03 ÷ 18.015 = 2 mol.

### How do I convert moles to grams?

Multiply the moles by the molar mass: m = n × M. Half a mole of table salt (NaCl, 58.44 g/mol) weighs 0.5 × 58.44 = 29.22 g.

### How many particles are in a mole?

One mole holds exactly 6.02214076 × 10²³ particles, Avogadro’s number. Since 2019 this number defines the mole in the SI. 2 mol of water holds 2 × 6.02214076 × 10²³ = 1.20443 × 10²⁴ molecules.

### Where does the molar mass come from?

It is the sum of the atomic weights of the atoms in the formula. The calculator uses the IUPAC CIAAW standard atomic weights (2024): H 1.0080 + H 1.0080 + O 15.999 = 18.015 g/mol for H₂O.

### What counts as a particle?

One formula unit of what you typed: an atom for an element such as Fe, a molecule for H₂O or CO₂, and one NaCl unit for an ionic compound. To count atoms in a compound, multiply by the atoms per formula unit (3 for H₂O).

### Why does the calculator say an element has no standard atomic weight?

Elements such as technetium (Tc) and plutonium (Pu) have no stable isotopes, so IUPAC gives no standard atomic weight. Choose "A number" and type the molar mass of your isotope instead.

## Sources

- IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), Abridged Standard Atomic Weights (2024 table). https://ciaaw.org/abridged-atomic-weights.htm (retrieved 2026-10-01)
- BIPM, The International System of Units (SI Brochure), 9th edition (2019), §2.2, Table 1: the Avogadro constant N_A = 6.02214076 × 10²³ mol⁻¹ exactly. https://www.bipm.org/en/publications/si-brochure (retrieved 2026-10-01)
- OpenStax, Chemistry 2e, §3.1 Formula Mass and the Mole Concept (molar mass; converting between mass, moles and particles). https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept (retrieved 2026-10-01)
