A single ratio with several uses
Mass percent is the share of a sample's mass that belongs to one component. The same calculation appears in several settings. A chemist checking a formula compares the mass of one element with the molar mass of the compound. An analyst reports how much iron an ore sample contains. A lab student tests whether a hydrate lost the expected amount of water on heating. In each case the arithmetic is the one in this page: constituent mass divided by total mass, times 100. The page takes two masses and returns one percentage, which makes it a quick check on a worked problem or a lab report line. The result is also a handy sanity check before you start a calculation that depends on composition, such as finding the mass of an element in a given amount of ore.
The formula and the default case
The formula is percent = 100 × part / total. The defaults use 12 g of the constituent in a 60 g sample, which gives 100 × 12 / 60 = 20 percent. Because the result is a ratio, the unit cancels. Grams, kilograms and milligrams all work, as long as both inputs use the same one. If the constituent mass exceeds the total, the result passes 100 percent, which usually means a typing error or masses taken from different samples. Percentages for all components of one sample should add to 100 percent, apart from rounding, and that sum is a useful check on a set of results.
Sodium and chlorine in table salt
To find the composition of sodium chloride from atomic masses, use about 22.99 g/mol for sodium, 35.45 g/mol for chlorine and 58.44 g/mol for the formula unit. Entering 22.99 as the part and 58.44 as the total gives about 39.34 percent sodium. Entering 35.45 as the part gives about 60.66 percent chlorine, and the two add to 100 percent. The molar masses play the role of gram masses here: treating one mole of the compound as the sample is equivalent to using the formula mass, because the ratio is the same at any sample size. This is how percent composition by formula is usually taught. Because a pure compound has a fixed composition, a sample of any size gives the same percentages. That is why a measured mass percent can help identify a compound or reveal an impurity.
Water in copper(II) sulfate pentahydrate
A hydrate holds water in its crystal structure, and the water share can be found from the formula. Copper(II) sulfate pentahydrate, CuSO4·5H2O, has a formula mass of about 249.68 g/mol, and the five waters contribute about 90.08 g/mol. Entering 90.08 and 249.68 returns about 36.08 percent water by mass. In a lab, the reverse measurement is common: heat a weighed sample, record the mass lost, and compare the lost mass with the original mass. A result well below the formula value suggests incomplete drying. A result above it suggests the starting sample was damp, or that the compound decomposed.
Using measured samples
Percent composition is not limited to formulas. If an ore sample of 8.00 g yields 2.50 g of iron by analysis, the iron content is 100 × 2.50 / 8.00 = 31.25 percent. If an alloy of 120 g contains 18 g of nickel, the nickel content is 15 percent. For a measured result, say how the masses were determined. The balance resolution limits how many digits are meaningful, and a result reported to four significant figures from a balance that reads to one decimal place claims more precision than the data support. Masses read to 0.01 g support about four significant figures for a sample of several grams, while a half-gram sample read to 0.1 g supports only one.
Mass percent is not mole percent
This page returns mass percent only. Mole percent, also called mole fraction times 100, divides moles of one component by the total moles of all components. The two can differ greatly. In a mixture of equal masses of hydrogen and oxygen gas, hydrogen is 50 percent by mass but a much larger share by moles, because a hydrogen molecule has a far smaller mass. Gas mixtures are usually quoted by volume or mole fraction, while solids and alloys are usually quoted by mass. State which basis you use, and convert through molar masses when the two must be compared. For water, hydrogen is only 11.19 percent of the mass, yet two of the three atoms in each molecule are hydrogen, which is 66.67 percent of the atoms.
Keeping the basis consistent
The part and the total must refer to the same sample under the same conditions. Do not mix a dry mass for the constituent with a wet mass for the whole. If a sample contains moisture and the report is on a dry basis, subtract the water from the total before dividing. Mixing bases is the most common source of percentages that do not add up. When the components of a compound are calculated from formula masses, use atomic masses from one source, such as the IUPAC standard atomic weights, to keep rounding consistent across components.
Mass percent in everyday labels and alloys
Percent by mass shows up well outside the chemistry classroom. A bottle of bleach, a fertilizer bag and a steel specification all describe their contents as mass percentages, and the arithmetic matches this page. A fertilizer labeled with a nitrogen share of 20 percent holds 20 g of nitrogen in every 100 g of product, so a 25 kg bag contains 5 kg of nitrogen. A brass sample with 30 g of zinc in 100 g of alloy is 30 percent zinc. When a label states a percentage, check whether it refers to the element itself or to a compound of it, such as phosphorus compared with the oxide P2O5, because the two bases give different numbers for the same product.
What a single composition division cannot confirm
The page performs one division and does not check that your masses are plausible, that the constituent belongs to the sample or that the results of several constituents add to 100 percent. It does not handle uncertainty, significant figures in the input or isotopic variation in atomic masses. The method follows the formula-mass and mole-concept material in OpenStax Chemistry 2e. For published analytical results, follow the rounding rules of the method you are reporting under.