Asparagus contains a chemical called asparagusic acid, which the body breaks down into various sulfur-containing compounds. When the compounds are excreted in urine, they enter a gaseous state, creating a distinct odor.
Asparagusic acid is only known to appear in asparagus, as of 2015. The process of breaking this acid down into its sulfuric components happens relatively quickly, meaning that many people may smell the compounds in their urine as soon as 15 to 30 minutes after consuming asparagus. The compounds released include dimethyl sulfide, dimethyl disulfide, dimethyl sulfoxide and dimethyl sulfone.
These sulfuric compounds are highly volatile, meaning they have a low enough boiling point that they turn into gases at room temperature. People are able to smell the compounds because these gases rise so that the nostrils detect them.
Between 20 and 50 percent of the general population report experiencing odd-smelling urine after eating asparagus. Some scientists believe that the remainder of people do not break down asparagusic acid during digestion and therefore do not produce unusual-smelling urine. Other scientists believe that only individuals with a specific gene are able to smell the sulfuric compounds. This group of scientists asserts that while everyone produces the smell after eating asparagus, only a fraction of the population is able to detect it.