Molar Mass Calculator — from chemical formula

Enter a chemical formula like Ca(OH)2 to compute its molar mass with a per-element breakdown — in your browser.

🔒 Runs entirely in your browser. Your input and output are never sent to a server or stored — fully private.

Examples
Did this tool help? Tap to react

About this tool

This molar mass calculator reads a chemical formula such as H2O, NaCl or Ca(OH)2 and returns its molar mass in grams per mole, with a breakdown showing how much each element contributes. It understands parentheses and subscripts, so nested groups and hydrates are handled correctly. The formula is parsed and the standard atomic weights are summed entirely in your browser, so nothing you enter is sent to a server.

Frequently asked questions

How do I type a chemical formula correctly?

Write each element with its standard symbol, capitalized correctly (Co is cobalt, while CO is carbon plus oxygen), and put the count after the element, like H2O for water. Use parentheses for repeated groups, for example Ca(OH)2, and the calculator multiplies everything inside by the subscript that follows.

What can I use the molar mass for?

Molar mass is the bridge between the mass of a substance and the number of moles, so it is what you need to weigh out the right amount for a reaction or to prepare a solution of a given concentration. Divide a sample mass in grams by the molar mass to get moles, or multiply moles by the molar mass to get grams.

Is my formula sent to a server?

No. The formula is parsed and the atomic weights are added up by code running in your browser, so what you type stays on your device and is never uploaded to or stored on a server.