Though MDMA is not specifically tested for in the standard 'SAMHSA-5" drug tests, it is chemically closely enough related to amphetamines that recent MDMA users will test positive in both amphetamines (a common test) and methamphetamines (a somewhat newer and less common test). Because of this, the detection periods for MDMA are very similar to those for amphetamines. Also, many tablets of street ecstasy are not pure MDMA and frequently includes amphetamines (and may also contain DXM, caffeine, MDA, MDE, ephedrine etc) which may trigger drug tests.

MDMA is detectable with hair tests and there are at least two drug testing companies (Psychemedics and Quest Diagnostics) which include it in their standard hair test. Hair tests generally take the most recent 1.5 inches of growth and use those for testing. That provides a detection period of approximately 90 days. If an individual's hair is shorter than 1.5 inches, this detection period will be shorter.

Erowid's drug testing information is a summary of data gathered from site visitors, journal articles, websites, and other resources. Detection periods depend on amount and frequency of use, metabolic rate, body mass, age, overall health, drug tolerance, and urine pH of each individual. Many substances that are not tested for in basic or extended urinalysis tests CAN be tested for by a laboratory willing to go to the trouble, although that is uncommon.