{"id":67155,"date":"2026-10-20T09:51:54","date_gmt":"2026-10-20T06:51:54","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=67155"},"modified":"2026-10-20T09:51:54","modified_gmt":"2026-10-20T06:51:54","slug":"molecular-weight-calculator-molar-mass-from-formula","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/chemistry\/molecular-weight-calculator-molar-mass-from-formula\/","title":{"rendered":"Molecular Weight Calculator \u2013 Molar Mass from Formula"},"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\">Find Molar Mass from a Chemical Formula<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"67155\" data-favorite-title=\"Molecular Weight\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/chemistry\/molecular-weight-calculator-molar-mass-from-formula\/\" data-favorite-excerpt=\"Find molar mass from a chemical formula and see each element\u2019s contribution. Optionally enter a sample mass to calculate moles and the number of molecules or formula units.\" 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\/molecular-weight-calculator-molar-mass-from-formula\/\" method=\"POST\" class=\"calculator\" id=\"calculator-67155\" data-post=\"67155\"><fieldset class=\"fieldset-input is-1\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field\" id=\"input-1\"><label for=\"field-1\">Chemical Formula<\/label><input type=\"text\" name=\"chemical_formula\" id=\"field-1\" aria-describedby=\"calc-info-1\" placeholder=\"e.g. C6H12O6 or CuSO4\u00b75H2O\" step=\"any\" value=\"C6H12O6\"\/><small id=\"calc-info-1\">Use case-sensitive element symbols. Parentheses, brackets and hydrate separators (\u00b7, . or *) are supported.<\/small><\/div><div class=\"field is-checkbox is-single\" id=\"input-2\"><input type=\"checkbox\" id=\"field-2\" value=\"1\" checked=\"checked\"\/><label for=\"field-2\">Calculate moles and number of particles from a mass<\/label><\/div><div class=\"field\" id=\"input-3\" hidden><label for=\"field-3\">Sample Mass<\/label><input type=\"text\" name=\"sample_mass\" id=\"field-3\" aria-describedby=\"calc-unit-3 calc-info-3\" data-number inputmode=\"decimal\" autocomplete=\"off\" spellcheck=\"false\" min=\"0\" value=\"180\"\/><div class=\"unit\" id=\"calc-unit-3\">g<\/div><small id=\"calc-info-3\">Optional. The particle count assumes one molecule or formula unit per calculated particle.<\/small><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"67155\">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> Formula Results<\/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>Element Breakdown<\/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\" id=\"output-3\"><span class=\"field-title\"><span>Amount of Substance<\/span><span class=\"result-term\">n<\/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 class=\"field-result\" id=\"output-4\"><span class=\"field-title\"><span>Number of Molecules or Formula Units<\/span><span class=\"result-term\">N<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/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=\"67155\" 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>Molecular Weight 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\">\n\\[ M=\\sum_i a_i A_i,\\qquad n=\\frac{m}{M},\\qquad N=nN_{\\mathrm A} \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(M\\) \u2014 molar mass of the substance (g\/mol)<\/li>\n<li>\\(a_i\\) \u2014 number of atoms of element \\(i\\) in one molecule or formula unit<\/li>\n<li>\\(A_i\\) \u2014 atomic weight of element \\(i\\) (g\/mol)<\/li>\n<li>\\(m\\) \u2014 sample mass (g)<\/li>\n<li>\\(n\\) \u2014 amount of substance (mol)<\/li>\n<li>\\(N\\) \u2014 number of molecules or formula units<\/li>\n<li>\\(N_{\\mathrm A}\\) \u2014 Avogadro constant, \\(6.02214076\\times10^{23}\\ \\mathrm{mol}^{-1}\\)<\/li>\n<\/ul>\n<p>Add the atomic-weight contributions of every element to obtain molar mass. If you enter a sample mass, divide it by molar mass to find moles, then multiply by the Avogadro constant to estimate the particle count.<\/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>Molecular Weight \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> The default formula is glucose, C6H12O6. Find its molar mass and the amount and particle count in the default 180 g sample.<\/p>\n<p>\\[ M=6(12.011)+12(1.008)+6(15.999)=180.156\\ \\mathrm{g\/mol} \\]<\/p>\n<p>\\[ n=\\frac{180\\ \\mathrm g}{180.156\\ \\mathrm{g\/mol}}\\approx0.99913408\\ \\mathrm{mol} \\]<\/p>\n<p>\\[ N\\approx0.99913408(6.02214076\\times10^{23})\\approx6.01693\\times10^{23} \\]<\/p>\n<p><strong>Result:<\/strong> The molar mass is 180.156 g\/mol. A 180 g sample contains approximately 0.99913408 mol and 6.01693 \u00d7 10\u00b2\u00b3 glucose molecules.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Enter the substance in <strong>Chemical Formula<\/strong>, using case-sensitive element symbols and whole-number subscripts written as ordinary digits. For example, enter <code>H2O<\/code>, <code>Ca(OH)2<\/code>, or <code>CuSO4\u00b75H2O<\/code>.<\/li>\n<li>Leave <strong>Calculate moles and number of particles from a mass<\/strong> selected if you want results for a sample. Clear it if you need only molar mass and the element breakdown.<\/li>\n<li>If the option is selected, enter a non-negative value in <strong>Sample Mass<\/strong> in grams. The default is 180 g.<\/li>\n<li>Read <strong>Molar Mass<\/strong> in g\/mol. Use <strong>Element Breakdown<\/strong> to check the parsed atom counts, each element\u2019s mass contribution, and its percentage of the total. When a sample mass is supplied, also read <strong>Amount of Substance<\/strong> and <strong>Number of Molecules or Formula Units<\/strong>.<\/li>\n<\/ol>\n<h2>What molecular weight means here<\/h2>\n<p>A chemical formula tells you which elements are present and how many atoms of each belong to one molecule or formula unit. This calculator multiplies those counts by stored atomic weights and adds the contributions. Although \u201cmolecular weight\u201d is commonly used in the name, the reported quantity is <strong>molar mass<\/strong>, in grams per mole. It applies to molecular substances such as glucose and to ionic compounds such as sodium chloride, which are described by formula units rather than individual molecules.<\/p>\n<p>Molar mass connects a measured mass to an amount in moles. One mole contains \\(6.02214076\\times10^{23}\\) specified entities. For the glucose example, one mole has a mass of 180.156 g according to the atomic weights used here. A 180 g sample is therefore slightly less than one mole\u2014not exactly one mole, despite the close numbers.<\/p>\n<p>The element breakdown helps you verify that the formula was interpreted as intended. In <code>Ca(OH)2<\/code>, for instance, the subscript 2 applies to both O and H, giving one Ca, two O, and two H atoms per formula unit. Its mass percentages describe each element\u2019s share of the compound\u2019s total formula mass; they are not the percentages of separate substances in a mixture. If elemental composition is your main goal, see the <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/percent-composition-from-chemical-formula-calculator\/\">percent composition calculator<\/a>.<\/p>\n<h2>Formula entry and practical limits<\/h2>\n<p>Use correct capitalization: <code>Co<\/code> is cobalt, while <code>CO<\/code> contains carbon and oxygen. Parentheses and square brackets can group atoms, and a following whole-number subscript multiplies the entire group. Hydrates can be written with <code>\u00b7<\/code>, <code>.<\/code>, or <code>*<\/code> as the separator; <code>CuSO4\u00b75H2O<\/code> includes five water units for every CuSO4 unit. These separators are not decimal points in this input.<\/p>\n<p>The calculator accepts a terminal ionic charge and omits it from the atom count. Electron mass is not included, so charge does not materially change the displayed molar mass. For an unambiguous charge following a polyatomic formula, use notation such as <code>SO4^2-<\/code>. Check the element breakdown if a charge or subscript could be read in more than one way.<\/p>\n<p>Results use the calculator\u2019s stored atomic weights, and molar mass is displayed to three decimal places; reference tables with different rounding may give slightly different values. The particle result assumes one molecule or formula unit per counted entity. It does not account for dissociation in solution, purity, or isotope-specific masses. A sample mass of zero gives zero moles and particles. For a different calculation involving particle count and gas volume, use the <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/avogadros-law-calculator\/\">Avogadro\u2019s law calculator<\/a>; for charged species measured by mass spectrometry, see the <a href=\"https:\/\/wpcalc.com\/en\/chemistry\/mass-spectrometry-m-z-calculator\/\">mass spectrometry m\/z calculator<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find molar mass from a chemical formula and see each element\u2019s contribution. Optionally enter a sample mass to calculate moles and the number of molecules or formula units.<\/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-67155","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\/67155","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=67155"}],"version-history":[{"count":1,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67155\/revisions"}],"predecessor-version":[{"id":67218,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67155\/revisions\/67218"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=67155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=67155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=67155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}