{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"empirical-formula"},"result":{"entity_type":"calculator","id":"empirical-formula","calculator_id":"empirical-formula","canonical_url":"https://tttkmbb.com/chemistry/empirical-formula","name":"Empirical Formula Calculator","title":"Empirical Formula Calculator – Simplest Formula from Percent Composition and Molecular Formula from Molar Mass","category":"chemistry","category_name":"Chemistry","tool_name":"calculate_empirical_formula","featured_mcp_tool":false,"description":"Converts the mass percentages (or masses) of each element into moles, divides by the smallest amount and scales to the smallest whole-number ratio to give the empirical formula; with a molar mass it also returns the molecular formula.","use_when":"You have elemental analysis data (mass percent or grams of each element) and need the empirical formula, or the molecular formula when the compound's molar mass is known.","do_not_use_when":"You start from a formula and need its percent composition or molar mass (use molar-mass), or the data are moles of each element already (write them as the counts directly).","inputs":[{"name":"composition","label":"Element composition","type":"string_list","required":true,"description":"Element symbols each followed by its mass percent or mass in grams, e.g. [\"C 40.0\", \"H 6.7\", \"O 53.3\"] or the single string \"C 40.0, H 6.7, O 53.3\" (also C:40.0 or C=40.0). Symbols are case-sensitive.","example":["C 40.0","H 6.7","O 53.3"]},{"name":"molar_mass_g_mol","label":"Molar mass of compound","type":"number","unit":"g/mol","required":false,"max":10000000,"exclusive_min":0,"description":"Molar mass of the compound (e.g. from mass spectrometry or colligative properties); when given, the molecular formula is derived.","example":180.16}],"outputs":[{"name":"empirical_formula","label":"Empirical formula","type":"string","decimals":4,"description":"Simplest whole-number ratio of atoms, with the elements in the order they were entered."},{"name":"empirical_formula_mass_g_mol","label":"Empirical formula mass","type":"number","unit":"g/mol","decimals":3,"description":"Molar mass of one empirical formula unit."},{"name":"molecular_formula","label":"Molecular formula","type":"string","decimals":4,"description":"Empirical formula multiplied by molecular_multiplier (only when molar_mass_g_mol is given)."},{"name":"molecular_multiplier","label":"Multiplier n","type":"integer","decimals":4,"description":"molar_mass_g_mol / empirical formula mass, rounded to the nearest integer."},{"name":"molecular_formula_mass_g_mol","label":"Molecular formula mass","type":"number","unit":"g/mol","decimals":3,"description":"Molar mass of the molecular formula found (compare with the input molar mass)."},{"name":"ratio_multiplier","label":"Ratio multiplier","type":"integer","decimals":4,"description":"Factor applied to the mole ratios to reach whole numbers (e.g. 2 when a ratio ends in .5)."},{"name":"elements","label":"Per-element work","type":"list","decimals":4,"description":"Per element: symbol, mass (or percent) given, atomic weight, moles, ratio to the smallest and the subscript in the empirical formula."},{"name":"total_mass","label":"Sum of inputs","type":"number","decimals":4,"description":"Sum of the values entered (should be about 100 for percentages)."}],"input_schema":{"type":"object","properties":{"composition":{"description":"Element symbols each followed by its mass percent or mass in grams, e.g. [\"C 40.0\", \"H 6.7\", \"O 53.3\"] or the single string \"C 40.0, H 6.7, O 53.3\" (also C:40.0 or C=40.0). Symbols are case-sensitive.","type":"array","items":{"type":"string"},"examples":[["C 40.0","H 6.7","O 53.3"]]},"molar_mass_g_mol":{"description":"Molar mass of the compound (e.g. from mass spectrometry or colligative properties); when given, the molecular formula is derived. Unit: g/mol.","type":"number","maximum":10000000,"exclusiveMinimum":0,"examples":[180.16],"x-unit":"g/mol"}},"additionalProperties":false,"required":["composition"]},"output_schema":{"type":"object","properties":{"empirical_formula":{"description":"Simplest whole-number ratio of atoms, with the elements in the order they were entered.","type":"string"},"empirical_formula_mass_g_mol":{"description":"Molar mass of one empirical formula unit. Unit: g/mol.","type":"number","x-unit":"g/mol"},"molecular_formula":{"description":"Empirical formula multiplied by molecular_multiplier (only when molar_mass_g_mol is given).","type":"string"},"molecular_multiplier":{"description":"molar_mass_g_mol / empirical formula mass, rounded to the nearest integer.","type":"integer"},"molecular_formula_mass_g_mol":{"description":"Molar mass of the molecular formula found (compare with the input molar mass). Unit: g/mol.","type":"number","x-unit":"g/mol"},"ratio_multiplier":{"description":"Factor applied to the mole ratios to reach whole numbers (e.g. 2 when a ratio ends in .5).","type":"integer"},"elements":{"description":"Per element: symbol, mass (or percent) given, atomic weight, moles, ratio to the smallest and the subscript in the empirical formula.","type":"array"},"total_mass":{"description":"Sum of the values entered (should be about 100 for percentages).","type":"number"}}},"formula":"moles_i = mass_percent_i / atomic_weight_i; ratio_i = moles_i / min(moles); subscript_i = round(ratio_i × f) for the smallest integer f (1–12) that makes every ratio_i × f within 0.1 of an integer; n = round(molar_mass / empirical_formula_mass); molecular formula = (empirical formula)_n","method":"Percentages are treated as grams of a 100 g sample, so masses in grams give the same result. Atomic weights are the IUPAC 2021 abridged values; ratios that stay more than 0.1 from an integer for every multiplier up to 12 are rounded with the best multiplier and flagged in a note.","sources":[{"name":"OpenStax Chemistry 2e – 3.2 Determining Empirical and Molecular Formulas","url":"https://openstax.org/books/chemistry-2e/pages/3-2-determining-empirical-and-molecular-formulas","type":"textbook","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Empirical formula","url":"https://en.wikipedia.org/wiki/Empirical_formula","type":"reference","retrieved_at":"2026-09-24"},{"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-24"}],"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":"C 40.0 %, H 6.7 %, O 53.3 %, molar mass 180.16","inputs":{"composition":["C 40.0","H 6.7","O 53.3"],"molar_mass_g_mol":180.16},"expected":{"empirical_formula":"CH2O","empirical_formula_mass_g_mol":30.026,"molecular_formula":"C6H12O6","molecular_multiplier":6,"molecular_formula_mass_g_mol":180.156,"ratio_multiplier":1,"total_mass":100},"url":"https://tttkmbb.com/api/v1/calculate/empirical-formula?composition=C+40.0%2CH+6.7%2CO+53.3&molar_mass_g_mol=180.16"},{"name":"Hematite: Fe 69.94 %, O 30.06 %","inputs":{"composition":"Fe 69.94, O 30.06"},"expected":{"empirical_formula":"Fe2O3","empirical_formula_mass_g_mol":159.687,"ratio_multiplier":2},"url":"https://tttkmbb.com/api/v1/calculate/empirical-formula?composition=Fe+69.94%2C+O+30.06"}],"faq":[{"q":"My ratios come out as 1.33 or 1.5. What happens?","a":"The calculator multiplies all ratios by the smallest integer (3 or 2 here) that turns them into whole numbers, which is how Fe2O3 or C3H8 arise from 1 : 1.5 or 1 : 2.67 ratios."},{"q":"Can I enter grams instead of percentages?","a":"Yes. Only the ratios matter, so masses from a combustion analysis (e.g. grams of C, H and O) work directly; the sum of inputs is reported so you can check it."},{"q":"Why does the molecular formula mass differ slightly from my molar mass?","a":"The multiplier is rounded to an integer; the reported molecular_formula_mass_g_mol is the exact mass of the formula found. A multiplier far from an integer (flagged in a note) suggests an error in the data."}],"tags":["empirical formula","molecular formula","percent composition","simplest formula","combustion analysis","mole ratio"],"related":[{"calculator_id":"molar-mass","reason":"Percent composition and molar mass of the formula found."},{"calculator_id":"mass-percent","reason":"Mass percent of a component in a mixture."},{"calculator_id":"moles-mass","reason":"Grams-to-moles conversion for one substance."}],"links":{"html":"https://tttkmbb.com/chemistry/empirical-formula","markdown":"https://tttkmbb.com/chemistry/empirical-formula.md","json":"https://tttkmbb.com/chemistry/empirical-formula.json","api":"https://tttkmbb.com/api/v1/calculate/empirical-formula","schema":"https://tttkmbb.com/api/v1/calculators/empirical-formula","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:49:58Z","next_actions":[{"tool":"run_calculator","calculator_id":"empirical-formula","reason":"Run Empirical Formula Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/chemistry/empirical-formula.md"}}