Farmer Giles wants to determine which fertilizer contains more nitrogen. To do this, he needs to calculate the percentage of nitrogen by mass in each fertilizer. KNO3 has a higher percentage of nitrogen than NaNO3 because KNO3 has a lower molar mass and therefore more of its mass is made up of nitrogen. Calculating percentage by mass involves using relative atomic masses and molar masses. For example, the percentage of nitrogen in ammonia is calculated by taking the mass of nitrogen atoms, dividing by the molar mass of ammonia, and multiplying by 100.