{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"molar-mass"},"result":{"entity_type":"calculator","id":"molar-mass","calculator_id":"molar-mass","canonical_url":"https://tttkmbb.com/chemistry/molar-mass","name":"Molar Mass Calculator","title":"Molar Mass Calculator – Molecular Weight and Percent Composition from a Chemical Formula","category":"chemistry","category_name":"Chemistry","tool_name":"calculate_molar_mass","featured_mcp_tool":true,"description":"Parses a chemical formula (including brackets, nested groups and hydrates) and sums IUPAC 2021 standard atomic weights to give the molar mass in g/mol, plus the atom count and mass-percent composition of each element.","use_when":"You have a chemical formula and need its molar mass (molecular weight), the number of atoms of each element, or its elemental mass-percent composition.","do_not_use_when":"You already know the molar mass and want to convert between grams and moles (use moles-mass) or need a solution concentration (use molarity).","inputs":[{"name":"formula","label":"Chemical formula","type":"string","required":true,"description":"Chemical formula with case-sensitive element symbols, integer subscripts, brackets and optional hydrate dot, e.g. C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. A trailing charge (NH4+, SO4^2-) or state (aq) is ignored.","example":"C6H12O6"}],"outputs":[{"name":"molar_mass_g_mol","label":"Molar mass","type":"number","unit":"g/mol","decimals":3,"description":"Sum of atomic weight × atom count over all elements."},{"name":"molecular_mass_da","label":"Molecular (formula) mass","type":"number","unit":"Da","decimals":3,"description":"Same value expressed in daltons (unified atomic mass units) per molecule or formula unit."},{"name":"atom_count","label":"Atoms per formula unit","type":"integer","decimals":4,"description":"Total number of atoms in one formula unit."},{"name":"element_count","label":"Number of elements","type":"integer","decimals":4,"description":"Number of distinct elements in the formula."},{"name":"composition","label":"Composition","type":"list","decimals":3,"description":"Per element: symbol, atom count, atomic weight, contributed mass (g/mol) and mass fraction in percent."}],"input_schema":{"type":"object","properties":{"formula":{"description":"Chemical formula with case-sensitive element symbols, integer subscripts, brackets and optional hydrate dot, e.g. C6H12O6, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O. A trailing charge (NH4+, SO4^2-) or state (aq) is ignored.","type":"string","examples":["C6H12O6"]}},"additionalProperties":false,"required":["formula"]},"output_schema":{"type":"object","properties":{"molar_mass_g_mol":{"description":"Sum of atomic weight × atom count over all elements. Unit: g/mol.","type":"number","x-unit":"g/mol"},"molecular_mass_da":{"description":"Same value expressed in daltons (unified atomic mass units) per molecule or formula unit. Unit: Da.","type":"number","x-unit":"Da"},"atom_count":{"description":"Total number of atoms in one formula unit.","type":"integer"},"element_count":{"description":"Number of distinct elements in the formula.","type":"integer"},"composition":{"description":"Per element: symbol, atom count, atomic weight, contributed mass (g/mol) and mass fraction in percent.","type":"array"}}},"formula":"molar_mass = Σ (atomic_weight_i × count_i); mass_fraction_percent_i = 100 × atomic_weight_i × count_i / molar_mass","method":"Atomic weights are the IUPAC 2021 abridged standard values (conventional values for elements whose weight is given as an interval, e.g. H 1.008, C 12.011, O 15.999, S 32.06, Cl 35.45); the result is therefore reproducible to 3 decimals but not identical to tables using more digits. Radioactive elements without a standard atomic weight use the mass number of their longest-lived isotope.","sources":[{"name":"IUPAC – Atomic Weights of the Elements (2021 table with 2023 revisions, Queen Mary University of London mirror)","url":"https://iupac.qmul.ac.uk/AtWt/","type":"standard","retrieved_at":"2026-09-23"},{"name":"CIAAW – Standard atomic weights (current values)","url":"https://www.ciaaw.org/atomic-weights.htm","type":"standard","retrieved_at":"2026-09-23"},{"name":"OpenStax Chemistry 2e – 3.1 Formula Mass and the Mole Concept","url":"https://openstax.org/books/chemistry-2e/pages/3-1-formula-mass-and-the-mole-concept","type":"textbook","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"Glucose C6H12O6","inputs":{"formula":"C6H12O6"},"expected":{"molar_mass_g_mol":180.156,"atom_count":24,"element_count":3,"composition":[{"element":"C","count":6,"mass_fraction_percent":40.002},{"element":"H","count":12,"mass_fraction_percent":6.714},{"element":"O","count":6,"mass_fraction_percent":53.284}]},"url":"https://tttkmbb.com/api/v1/calculate/molar-mass?formula=C6H12O6"},{"name":"Copper(II) sulfate pentahydrate CuSO4·5H2O","inputs":{"formula":"CuSO4·5H2O"},"expected":{"molar_mass_g_mol":249.677,"atom_count":21,"element_count":4},"url":"https://tttkmbb.com/api/v1/calculate/molar-mass?formula=CuSO4%C2%B75H2O"}],"faq":[{"q":"Which atomic weights are used?","a":"IUPAC 2021 standard atomic weights abridged to five significant figures (H 1.008, C 12.011, N 14.007, O 15.999, Na 22.990, Cl 35.45, Fe 55.845). Textbooks using more digits or older tables may differ in the third decimal."},{"q":"Can I enter ions, hydrates or states?","a":"Yes: NH4+, NO3-, SO4^2- or 'CO3 2-' drop the charge (electron mass is negligible), CuSO4·5H2O (also written CuSO4.5H2O or CuSO4*5H2O) adds five waters, and (aq)/(s)/(l)/(g) is ignored. Write multi-digit charges as Fe^3+ or 'Fe 3+', because Fe3+ is read as three iron atoms."},{"q":"Why is my formula rejected?","a":"Element symbols are case-sensitive (Co ≠ CO, nacl is invalid), subscripts must be positive integers, and every opening bracket needs a closing one. Structural notation such as CH3-CH2-OH is not parsed; write C2H6O instead."}],"tags":["molar mass","molecular weight","formula weight","percent composition","atomic weight","g/mol"],"related":[{"calculator_id":"moles-mass","reason":"Convert grams of this substance to moles and number of molecules."},{"calculator_id":"molarity","reason":"Turn a mass of this compound into a solution concentration."},{"calculator_id":"mass-percent","reason":"Mass percent of a solute in a solution rather than of an element in a compound."}],"links":{"html":"https://tttkmbb.com/chemistry/molar-mass","markdown":"https://tttkmbb.com/chemistry/molar-mass.md","json":"https://tttkmbb.com/chemistry/molar-mass.json","api":"https://tttkmbb.com/api/v1/calculate/molar-mass","schema":"https://tttkmbb.com/api/v1/calculators/molar-mass","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:31:32Z","next_actions":[{"tool":"calculate_molar_mass","calculator_id":"molar-mass","reason":"Run Molar Mass Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/chemistry/molar-mass.md"}}