Molar Mass Calculator

This molar mass calculator determines the molecular weight of any compound directly from its chemical formula, using standard IUPAC atomic weights. Molar mass, expressed in grams per mole (g/mol), is the bridge between the mass you can weigh on a balance and the number of molecules that chemistry equations are written in. Almost every quantitative chemistry calculation begins here: to find how many moles of a substance you have, you divide its mass in grams by its molar mass; to find how many grams you need of a given number of moles, you multiply. You type in the chemical formula using standard notation and the calculator adds up the atomic weight of every atom it contains. Element symbols must use correct capitalisation: a capital first letter and a lower-case second letter where applicable, such as Na for sodium, Cl for chlorine, or Mg for magnesium. Subscript numbers are written as ordinary digits, so water is H2O and glucose is C6H12O6. Brackets are fully supported for grouped units, meaning calcium hydroxide is Ca(OH)2 and aluminium sulfate is Al2(SO4)3. The built-in element table covers hydrogen through uranium and includes all elements commonly encountered in general, organic, and inorganic chemistry coursework. The result updates instantly as you type. Try H2O to get 18.02 g/mol, or C6H12O6 to get 180.16 g/mol, which are the two worked examples shown below. The calculator is intended for educational use and double-checking calculations; always verify critical values against authoritative sources for professional or laboratory work.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
18.02 g/mol
molar mass of H2O
FormulaH2O
Molecular weight18.015 amu

Capitalise element symbols correctly: H, He, Li, Na, Cl, Ca, Fe, etc. Brackets are supported: Ca(OH)2, Al2(SO4)3. If the formula is invalid the result shows "check the formula".

How it works

The calculator parses the formula character by character. When it reads a capital letter it starts a new element symbol, adds a lower-case letter if the next character is one, then looks up that symbol in the atomic weight table. Any digits that follow are the count of that atom; if there are none, the count is 1. Brackets cause the calculator to parse the enclosed group recursively and then multiply its total mass by the number following the closing bracket. All the partial masses are added together to give the molar mass in g/mol.

Worked example

Water is H2O. The calculator finds two hydrogen atoms at 1.008 g/mol each (2.016 total) plus one oxygen atom at 15.999 g/mol, for a total of 18.015 g/mol, displayed as 18.02 g/mol. Glucose is C6H12O6: six carbons at 12.011 (72.066) plus twelve hydrogens at 1.008 (12.096) plus six oxygens at 15.999 (95.994) gives 180.16 g/mol.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.