{"id":66541,"date":"2026-10-07T08:32:48","date_gmt":"2026-10-07T05:32:48","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=66541"},"modified":"2026-10-07T08:32:48","modified_gmt":"2026-10-07T05:32:48","slug":"percent-composition-from-chemical-formula-calculator","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/chemistry\/percent-composition-from-chemical-formula-calculator\/","title":{"rendered":"Percent Composition from Chemical Formula Calculator"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Mass Percent of Each Element in a Compound<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"66541\" data-favorite-title=\"Percent Composition from Formula\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/chemistry\/percent-composition-from-chemical-formula-calculator\/\" data-favorite-excerpt=\"Enter a chemical formula such as C6H12O6, Ca(OH)2 or CuSO4\u00b75H2O and get the molar mass plus the mass percent of every element in the compound. Optionally override the atomic masses used.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-chemistry\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/chemistry\/percent-composition-from-chemical-formula-calculator\/\" method=\"POST\" class=\"calculator\" id=\"calculator-66541\" data-post=\"66541\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field is-single has-term\" id=\"input-1\"><label for=\"field-1\">Chemical Formula<\/label><div class=\"term\">formula<\/div>  <div class=\"absolute bottom-0 left-16 top-8 w-2 h-0.5 bg-blue-500\"><\/div><input type=\"text\" name=\"chemical_formula\" id=\"field-1\" aria-describedby=\"calc-info-1\" placeholder=\"e.g. Ca(OH)2 or CuSO4\u00b75H2O\" step=\"any\" value=\"C6H12O6\"\/><small id=\"calc-info-1\">Element symbols are case-sensitive (Co is cobalt, CO is carbon monoxide). Parentheses and brackets with multipliers are supported, as are hydrate dots like CuSO4\u00b75H2O.<\/small><\/div><div class=\"field is-single\" id=\"input-2\"><label for=\"field-2\">Atomic Masses (optional)<\/label><textarea id=\"field-2\" name=\"atomic_masses_optional\">H: 1.008; C: 12.011; O: 15.999<\/textarea><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"66541\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Percent Composition<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>Molar Mass<\/span><span class=\"result-term\">M<\/span><\/span><span class=\"field-value\" id=\"result-1\" data-unit=\"g\/mol\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-2\"><span class=\"field-title\"><span>Mass Percent of Each Element<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-3\"><span class=\"field-title\"><span>Calculation Details<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"66541\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Percent Composition Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\\[ \\text{mass \\% of element } E = \\frac{n_E \\times A_r(E)}{M} \\times 100 \\qquad\\text{where}\\qquad M = \\sum_i n_i \\times A_r(i) \\]<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(n_E\\) \u2014 number of atoms of element \\(E\\) in the formula (the subscript)<\/li>\n<li>\\(A_r(E)\\) \u2014 atomic mass of element \\(E\\) (g\/mol)<\/li>\n<li>\\(M\\) \u2014 molar mass of the whole compound (g\/mol)<\/li>\n<\/ul>\n<p>Each element's total mass in one mole of the compound is divided by the molar mass and expressed as a percentage. The percentages of all elements always add up to 100%.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Percent Composition \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> find the percent composition of glucose, C<sub>6<\/sub>H<sub>12<\/sub>O<sub>6<\/sub>.<\/p>\n<p>\\[ M = 6 \\times 12.011 + 12 \\times 1.008 + 6 \\times 15.999 = 72.066 + 12.096 + 95.994 = 180.156 \\text{ g\/mol} \\]<\/p>\n<p>\\[ \\text{C: } \\frac{72.066}{180.156} \\times 100 = 40.002\\% \\quad \\text{H: } \\frac{12.096}{180.156} \\times 100 = 6.714\\% \\quad \\text{O: } \\frac{95.994}{180.156} \\times 100 = 53.287\\% \\]<\/p>\n<p><strong>Result:<\/strong> glucose is 40.002% carbon, 6.714% hydrogen and 53.287% oxygen by mass (molar mass 180.156 g\/mol). In other words, 100 g of glucose contains 40.00 g of carbon, 6.71 g of hydrogen and 53.29 g of oxygen.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to Use the Calculator<\/h2>\n<ol>\n<li>Type the compound's formula into the <strong>Chemical Formula<\/strong> field. Element symbols are case-sensitive: <code>Co<\/code> is cobalt, but <code>CO<\/code> is carbon monoxide. Parentheses and square brackets with multipliers (e.g. <code>Ca(OH)2<\/code>, <code>Fe2(SO4)3<\/code>) and hydrate dots (e.g. <code>CuSO4\u00b75H2O<\/code>) are supported.<\/li>\n<li>If you want to use atomic masses other than the built-in IUPAC values (for example, the rounded values from your textbook), enter them in the <strong>Atomic Masses (optional)<\/strong> field, one per line or separated by semicolons, in the format <code>Symbol: mass<\/code> \u2014 for example <code>Cl: 35.45; Cu: 63.546<\/code>. Leave the field empty to use standard values.<\/li>\n<li>Read the results: the molar mass of the compound, a table with the mass percent of every element, and a step-by-step breakdown of the calculation.<\/li>\n<\/ol>\n<h2>What Is Percent Composition?<\/h2>\n<p>Percent composition (also called mass percent or percentage composition) tells you what fraction of a compound's mass comes from each chemical element. Water is 11.19% hydrogen and 88.81% oxygen by mass; table salt, NaCl, is 39.34% sodium and 60.66% chlorine. Because percent composition depends only on the formula and the atomic masses, it is the same for any sample of a pure compound, whether you have a milligram or a kilogram.<\/p>\n<p>The result is easy to interpret practically: the mass percent of an element equals the grams of that element contained in 100 g of the compound. If a fertilizer label states that ammonium nitrate, NH<sub>4<\/sub>NO<sub>3<\/sub>, is 35.00% nitrogen, that means 35 g of nitrogen in every 100 g of fertilizer \u2014 a number you can verify with this calculator.<\/p>\n<p>Percent composition is a standard tool in chemistry courses and in the lab. It is used to check the purity of a sample against its theoretical composition, to compare fertilizers by nutrient content, to analyze the composition of minerals and alloys, and as the first step in determining an empirical formula from experimental data. Together with related measures such as <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/atom-economy-calculator\/\">atom economy<\/a>, it also helps evaluate how efficiently a synthesis incorporates starting material atoms into the desired product.<\/p>\n<h2>Assumptions and Practical Tips<\/h2>\n<ul>\n<li><strong>Natural isotope mixtures.<\/strong> The built-in atomic masses are IUPAC conventional values averaged over natural isotopic abundances, so the results describe an ordinary terrestrial sample. An enriched or synthetic isotopic sample would have a slightly different composition; use the atomic-mass overrides to model such cases.<\/li>\n<li><strong>Whole-number subscripts.<\/strong> Subscripts are read as exact whole numbers. Ionic charge notation (e.g. SO4^2-) and dot-separated adducts other than hydrates are not supported \u2014 expand them into a single combined formula if needed.<\/li>\n<li><strong>Hydrates.<\/strong> For hydrates like <code>CuSO4\u00b75H2O<\/code>, use the middle dot, an asterisk or a period between the salt and the water. The water of crystallization is included in the molar mass, so hydrogen and oxygen percentages reflect the full hydrate.<\/li>\n<li><strong>Check your capitalization.<\/strong> The most common input error is letter case. <code>Co<\/code> (cobalt), <code>CO<\/code> (carbon monoxide) and <code>CoO<\/code> (cobalt(II) oxide) are all different compounds with very different compositions.<\/li>\n<li><strong>Rounding.<\/strong> Percentages are shown to three decimals and may sum to slightly more or less than 100% because of rounding; small deviations of \u00b10.01% are normal.<\/li>\n<\/ul>\n<p>If you are working with reaction analysis rather than a single compound, you may also find the <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/mass-spectrometry-m-z-calculator\/\">mass spectrometry m\/z calculator<\/a> useful, and the <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/degree-of-unsaturation-calculator\/\">degree of unsaturation calculator<\/a> can help you interpret the molecular formula once you have derived it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Enter a chemical formula such as C6H12O6, Ca(OH)2 or CuSO4\u00b75H2O and get the molar mass plus the mass percent of every element in the compound. Optionally override the atomic masses used.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[54],"tags":[56],"class_list":["post-66541","post","type-post","status-publish","format-standard","hentry","category-chemistry","tag-stoichiometry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=66541"}],"version-history":[{"count":1,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66541\/revisions"}],"predecessor-version":[{"id":66542,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/66541\/revisions\/66542"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=66541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=66541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=66541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}