⏱️

How Long Do Opioids Stay in Your System?

Detection times vary by opioid type and testing method. Here is a detailed breakdown of how long each opioid remains detectable in urine, blood, saliva, and hair.

Opioid Detection Times Explained

How long opioids remain in your system depends on several interrelated factors: the specific opioid used, the testing method, your metabolism, body mass, hydration level, liver and kidney function, age, and the frequency and duration of use. Each opioid has a unique half-life — the time it takes for your body to eliminate half of the drug — which directly influences how long it stays detectable. Short-acting opioids like codeine and hydrocodone are typically cleared faster than long-acting ones like methadone. The type of drug test also matters significantly: urine tests offer a moderate detection window and are the most commonly used in workplace and clinical settings, while hair follicle tests can detect opioid use for up to 90 days. Blood and saliva tests have shorter detection windows but can confirm very recent use. Understanding these timelines can help you make informed decisions about your health, whether you are managing a prescription, preparing for a drug screening, or reflecting on your relationship with these substances.

2.7 million
Americans aged 12 and older had an opioid use disorder in 2023
Source: SAMHSA, 2023 National Survey on Drug Use and Health
81,083
opioid-involved overdose deaths occurred in the United States in 2022
Source: CDC National Center for Health Statistics
8–59 hours
range of methadone half-life, the widest variability among common opioids
Source: Clinical Pharmacology & Therapeutics
90 days
detection window for opioid use through hair follicle testing
Source: Substance Abuse and Mental Health Services Administration

Detection Times by Opioid Type

Different opioids are metabolized at different rates, which directly affects how long they remain detectable in your body. Short-acting opioids like codeine and immediate-release hydrocodone are processed relatively quickly, while long-acting formulations and drugs like methadone linger far longer. Your individual metabolism, age, body fat percentage, liver function, and how frequently you use the substance all influence these windows. Chronic or heavy use extends detection times because opioids and their metabolites accumulate in body tissues and are released gradually. The figures below represent general ranges for occasional use — regular or heavy use can push detection windows significantly longer. If you are prescribed an opioid and are concerned about an upcoming test, your prescribing physician can provide documentation, and the testing laboratory can account for prescribed medications in their analysis.

Codeine

Codeine has a half-life of approximately 2.5 to 3 hours and is typically detectable in urine for 1 to 2 days after the last dose. It is metabolized into morphine by the liver, which means both substances may appear on a drug test after codeine use.

Hydrocodone

Hydrocodone has a half-life of roughly 3.5 to 4 hours. It is generally detectable in urine for 2 to 4 days. Hydrocodone is metabolized into hydromorphone, and both compounds may be identified during testing. Extended-release formulations can extend detection times.

Oxycodone

Oxycodone has a half-life of about 3 to 5 hours and is detectable in urine for 2 to 4 days. It is metabolized into oxymorphone and noroxycodone. Extended-release versions like OxyContin release the drug over a longer period, which can extend the detection window.

Morphine

Morphine has a half-life of 2 to 4 hours and is typically detectable in urine for up to 3 days. As the primary metabolite of several other opioids, morphine frequently appears on drug tests even when the original substance was heroin or codeine.

Methadone

Methadone is a long-acting synthetic opioid with a half-life of 8 to 59 hours, averaging around 24 hours. It can be detected in urine for 7 to 10 days or longer after the last dose. Its extended half-life is what makes it useful for medication-assisted treatment but also means it lingers in the body far longer than most opioids.

Detection Windows by Test Type

The method of drug testing determines how far back opioid use can be detected. Each test type measures different biological markers and has distinct advantages and limitations. Urine testing is the most common method used in workplace screenings, clinical settings, and legal proceedings because it offers a practical balance between detection window and ease of collection. Blood tests are more invasive and expensive but provide precise confirmation of recent use. Saliva tests are gaining popularity for their non-invasive collection and ability to detect very recent use, making them useful in roadside testing and some workplace programs. Hair follicle tests have the longest detection window by far, but they cannot detect use from the most recent 5 to 7 days because it takes time for drug metabolites to be incorporated into the growing hair shaft. Each test has its role, and the choice of test often depends on the context and purpose of the screening.

Urine Testing

The most widely used method for opioid detection. Most opioids are detectable in urine for 2 to 4 days after the last dose, though methadone can be detected for 7 to 10 days. Urine tests detect metabolites rather than the parent drug, making them reliable for confirming use within the past several days.

Blood Testing

Blood tests detect opioids for a shorter window, typically 6 to 24 hours for most short-acting opioids and up to several days for methadone. They are the most accurate method for determining current impairment but are more expensive and invasive, so they are usually reserved for medical or legal situations.

Saliva Testing

Oral fluid tests can detect most opioids for 24 to 48 hours after use. They are particularly useful for detecting very recent use and are increasingly popular in workplace and roadside testing because sample collection is quick, non-invasive, and difficult to tamper with.

Hair Follicle Testing

Hair tests can detect opioid use for up to 90 days. Drug metabolites are deposited into the hair shaft via the bloodstream as the hair grows. A standard test uses a 1.5-inch sample of hair closest to the scalp, representing approximately three months of growth. This method is best for detecting patterns of long-term use.

Track your patterns and take control of your health with Sobrius

Whether you are tapering off a prescription or reassessing your relationship with opioids, tracking your progress can make a real difference. Free on the App Store and Google Play.

Understanding Half-Life and Elimination

A drug's half-life is the time required for the body to reduce its concentration by 50 percent. It generally takes four to five half-lives for a substance to be effectively eliminated from the body, though trace amounts may persist longer and remain detectable on sensitive tests. For example, codeine with a half-life of about 3 hours would be largely eliminated within 12 to 15 hours, yet its metabolites can still be detected in urine for 1 to 2 days. Methadone, with its variable half-life of 8 to 59 hours, may take several days to over a week for full elimination. Several factors influence how quickly your body processes opioids. Liver enzymes, particularly the cytochrome P450 system, play a central role in opioid metabolism — genetic variations in these enzymes can make some people fast or slow metabolizers. Kidney function affects how quickly metabolites are excreted in urine. Age, body composition, hydration status, and whether you are taking other medications that compete for the same metabolic pathways all affect elimination speed. Chronic use leads to accumulation in fatty tissues, significantly extending the time needed for complete clearance.

Fast Metabolizers vs. Slow Metabolizers

Genetic variations in liver enzymes, particularly CYP2D6 and CYP3A4, determine how quickly an individual processes opioids. Ultra-rapid metabolizers clear drugs faster, while poor metabolizers retain them longer, affecting both detection times and the drug's clinical effects.

Impact of Chronic Use

Long-term or heavy opioid use leads to accumulation of the drug and its metabolites in body fat and tissues. This can extend detection windows well beyond the standard ranges cited for occasional use, sometimes by days or even weeks.

Age and Body Composition

Older adults and individuals with higher body fat percentages tend to eliminate opioids more slowly. Reduced liver and kidney function in older adults slows metabolism and excretion, while fat-soluble metabolites can be stored in adipose tissue and released gradually.

Factors That Affect How Long Opioids Stay in Your System

Beyond the specific opioid and testing method, numerous individual factors influence detection times. Hydration level plays a role in urine testing — dehydration concentrates urine and may make metabolites easier to detect, while excessive hydration can dilute samples (which testing labs check for). Your metabolic rate, influenced by genetics, thyroid function, physical activity level, and overall health, determines how efficiently your body processes and eliminates substances. Liver health is critically important because the liver is the primary site of opioid metabolism — conditions like hepatitis, cirrhosis, or fatty liver disease significantly slow drug clearance. Kidney function matters because metabolites are primarily excreted through urine. The method of opioid administration (oral, intravenous, transdermal, or insufflated) also affects absorption and elimination rates. Concurrent use of other medications or substances can slow or accelerate opioid metabolism by competing for or inducing the same enzyme pathways. If you find yourself frequently thinking about how to clear opioids from your system, it may be worth reflecting on whether your use has become a source of stress or concern — that awareness itself can be a valuable starting point for making changes.

Liver and Kidney Function

Impaired liver function slows the metabolism of opioids, while compromised kidney function reduces the excretion of metabolites. Both conditions can significantly extend detection windows and increase the risk of drug accumulation and toxicity.

Hydration and Urine pH

Urine pH and hydration status can influence the rate at which opioid metabolites are excreted. Acidic urine tends to increase excretion of certain opioids, while alkaline urine can slow it. However, labs routinely check for diluted or adulterated samples.

Drug Interactions

Many medications interact with the cytochrome P450 enzyme system that metabolizes opioids. CYP3A4 inhibitors like certain antifungals and antibiotics can slow opioid clearance, while inducers like rifampin can accelerate it, altering both effects and detection times.

Helpful Resources

SAMHSA National Helpline

Free, confidential, 24/7 treatment referral and information service for individuals and families facing substance use disorders. Available in English and Spanish.

1-800-662-4357

Visit Website

NIDA Opioid Information

Comprehensive, research-backed information from the National Institute on Drug Abuse about opioid pharmacology, effects, testing, addiction, and treatment options.

Visit Website

Narcotics Anonymous (NA)

A worldwide community-based organization offering peer support and a proven recovery program for individuals struggling with drug addiction, including opioid dependence.

Visit Website

Crisis Text Line

Free, 24/7 crisis support via text message. Trained counselors provide immediate help for people in distress, including those struggling with substance use.

Text HOME to 741741

Visit Website

Frequently Asked Questions

Find answers to common questions about recovery and sobriety.

Track your patterns and take control of your health with Sobrius

Whether you are tapering off a prescription or reassessing your relationship with opioids, tracking your progress can make a real difference. Free on the App Store and Google Play.