Molar Mass API
Molar-mass and stoichiometry maths as an API, computed locally and deterministically. The molarmass endpoint parses any chemical formula — with parentheses, square brackets and hydrate dots, such as Ca(OH)2, [Fe(CN)6]3 or CuSO4·5H2O — against the IUPAC conventional atomic weights and returns the molar mass in grams per mole, the total atom count and the per-element breakdown with each element's mass contribution and mass percent. The convert endpoint moves between moles, mass in grams and number of molecules for a formula, using n = mass ÷ M = molecules ÷ Nₐ with Avogadro's number. The percent endpoint gives the percent composition by mass and, for a given sample mass, the mass of each element it contains. The formula is parsed locally, so it works for any valid formula, not just compounds in a database, and is instant and private. Ideal for chemistry-education, laboratory, pharmaceutical and science app developers, stoichiometry and lab-prep tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This computes molar mass from a formula; for compound database lookup use a chemistry API and for element properties an elements API.
api.oanor.com/molarmass-api