A single dose of a prescription painkiller can still show up on a drug test days after you last took it. That surprises a lot of people, including patients who took the medication exactly as directed. Understanding how long opioids linger in the body is not just a curiosity for people worried about workplace testing. It matters for medical providers managing dosages, for people in recovery tracking their progress, and for anyone trying to make sense of how these drugs actually behave once they enter the bloodstream.
This article covers the major opioid medications, how they are processed by the body, what factors push detection windows longer or shorter, and what different types of drug tests can actually reveal. The information here applies broadly to opioids as a class, with attention to the specific drugs that come up most often in clinical and testing contexts.
Why Opioids Do Not Leave the Body Instantly
When you swallow a painkiller, your body does not simply use it and discard it cleanly. The drug gets absorbed into the bloodstream, distributed to tissues, and then broken down by the liver into smaller compounds called metabolites. Those metabolites travel to the kidneys and eventually leave the body through urine. The process takes time, and the timeline varies considerably depending on the specific drug.
A concept called half-life explains a lot of this. The half-life of a drug is how long it takes for the concentration in your blood to drop by half. A drug with a short half-life clears quickly. A drug with a long half-life stays active longer. But here is the part that trips people up: even after a drug stops producing noticeable effects, its metabolites can remain detectable in urine for a much longer window. The drug feels gone. The test disagrees.
Common Opioids and Their General Detection Windows
Detection times are not exact numbers. They are ranges shaped by individual biology, test sensitivity, and how much of the drug was taken. That said, research and clinical practice have established reasonably reliable general windows for the most frequently prescribed and tested opioids. The table below summarizes typical detection times across three common testing methods.
| Opioid | Urine Detection | Blood Detection | Hair Detection |
| Morphine | 2 to 3 days | Up to 12 hours | Up to 90 days |
| Codeine | 1 to 2 days | Up to 12 hours | Up to 90 days |
| Hydrocodone | 2 to 4 days | Up to 24 hours | Up to 90 days |
| Oxycodone | 3 to 4 days | Up to 24 hours | Up to 90 days |
| Methadone | 3 to 12 days | Up to 36 hours | Up to 90 days |
| Fentanyl | 1 to 3 days | Up to 12 hours | Up to 90 days |
| Buprenorphine | 7 to 10 days | Up to 72 hours | Up to 90 days |
Hair testing stands apart from the others. Because hair grows at roughly half an inch per month, a 1.5-inch sample can theoretically capture about 90 days of drug exposure. That makes hair follicle tests useful for detecting patterns of use rather than recent single doses. However, hair tests are also more expensive and less commonly used in standard employment or clinical screening contexts.
The Variables That Change Your Personal Timeline
Two people can take the same dose of the same opioid and have meaningfully different detection windows. This is not speculation. It reflects well-documented differences in human metabolism and physiology. Several factors consistently shift how long these drugs stay detectable.
- Body fat percentage: Many opioids are lipophilic, meaning they bind to fat tissue. People with higher body fat may retain drug metabolites longer because the compounds accumulate in fatty tissue before slowly releasing back into the bloodstream.
- Liver and kidney function: The liver breaks drugs down and the kidneys flush them out. Impaired function in either organ slows the whole clearance process significantly.
- Age: Older adults typically have slower metabolic rates and reduced kidney filtration capacity, which extends detection windows compared to younger adults taking the same drug.
- Hydration: While drinking large amounts of water does not eliminate drug metabolites from the body, it does affect urine concentration. Dilute urine can lower the measured concentration of metabolites, though many modern tests flag unusually dilute samples.
- Frequency and duration of use: A person who has taken an opioid daily for months has built up a much larger reservoir of the drug and its metabolites than someone who took a single dose. Chronic use almost always extends detection times.
- Specific drug formulation: Extended-release versions of opioids are designed to release the drug slowly over time. That means the body continues absorbing the active compound for longer, which can push detection windows out further than immediate-release versions of the same medication.
A Closer Look at Urine Testing
Urine testing is by far the most common method used in workplace screenings, probation compliance checks, and clinical monitoring programs. It balances cost, ease of collection, and a detection window long enough to catch recent use. Blood tests are more precise but require a trained collector and only catch very recent use. Saliva tests are quick and non-invasive but generally have shorter windows than urine.
For opioid-specific urine testing, the science gets nuanced quickly. Take hydrocodone as one example. Understanding how hydrocodone in urine behaves requires knowing that the drug converts to several metabolites including hydromorphone, and standard immunoassay panels do not always distinguish cleanly between opioids in the same family. A positive result often triggers a confirmatory test using gas chromatography-mass spectrometry, or GC-MS, which can identify the specific compounds present at a much higher level of accuracy.
The cutoff threshold also matters more than most people realize. Urine tests do not just detect the presence of a substance. They measure whether the concentration exceeds a defined threshold, typically expressed in nanograms per milliliter (ng/mL). The standard federal workplace cutoff for opioids under SAMHSA guidelines is 2,000 ng/mL for morphine equivalents on an initial screen, with a lower confirmation cutoff of 2,000 ng/mL for morphine and codeine specifically. A person whose concentration falls below the cutoff will test negative even if trace amounts remain. This is why the same person might test positive on day two and negative on day five, even though the drug has not fully left the system.
Opioids With Unusually Long Detection Profiles
Most opioids clear the body in a few days under normal conditions. A couple of them behave very differently, and that difference carries real clinical significance.
Methadone
Methadone has an exceptionally long and variable half-life, ranging from roughly 8 hours to over 59 hours depending on the individual, according to data cited in pharmacology literature. That variability makes it genuinely difficult to predict when it will clear any given person’s system. In some cases, urine detection extends to 12 days or more after the last dose. This is clinically important because methadone is used both as a pain medication and as a treatment for opioid use disorder, meaning testing programs need to account for its unusual pharmacokinetic profile.
Buprenorphine
Buprenorphine, commonly known under brand names like Subutex and as part of Suboxone, also has a long half-life, typically estimated at 24 to 42 hours. Because it is used in medication-assisted treatment for opioid use disorder, it is often specifically tested for on expanded panels rather than standard opioid screens. Urine detection of buprenorphine and its primary metabolite, norbuprenorphine, can extend to 10 days or longer after regular use.
What Affects Test Results Beyond the Drug Itself
Drug testing is more complicated than a simple positive or negative answer. A few additional factors can influence results in ways that matter for anyone interpreting them accurately.
- Poppy seed consumption: This is not a myth. Poppy seeds contain trace amounts of morphine and codeine. Eating a poppy seed bagel or muffin before a urine test can, in some cases, produce a low-level positive on an initial immunoassay screen. Confirmatory GC-MS testing and updated cutoff thresholds have reduced but not eliminated this possibility.
- Cross-reactivity: Some over-the-counter medications and supplements can trigger false positives on initial immunoassay screens because their molecular structure resembles the target compound closely enough to bind to the test antibody. Quinolone antibiotics, for example, have been associated with false positive results for opioids in some assays.
- Sample handling and storage: Urine samples that are not properly stored or tested within an appropriate timeframe can degrade. Temperature extremes in particular affect the stability of certain metabolites, which can produce artificially low concentration readings.
- Test panel selection: A standard five-panel drug test may not include all opioids. Fentanyl, for example, is not reliably detected on many standard panels and requires a specific add-on test. This has become a significant issue in clinical and forensic contexts given how prevalent synthetic opioids have become.
See also: Kratom Drink Mixes From KRATOMade—Reviews Show Why Buyers Trust The Brand
Practical Takeaways for Anyone Facing a Test or Supporting Someone Who Is
If you are a patient prescribed an opioid medication, the clearest thing you can do is be transparent with the testing administrator about your prescription. A verified prescription does not make a positive result disappear, but it does give the medical review officer the information needed to classify the result accurately. Most legitimate testing programs have a medical review officer, an MRO, whose job is specifically to evaluate positive results in light of documented prescriptions and medical history.
If you are supporting someone in recovery and trying to understand what their test results mean, the timelines and variables described here should help ground that conversation in accurate information rather than assumptions. A positive test on day eight does not necessarily mean someone used recently. A negative test on day three does not necessarily mean the drug is gone from their system entirely.
Drug testing is a tool, not a verdict. Its value depends entirely on how well the people interpreting the results understand what the test can and cannot tell them. The more accurate your baseline knowledge, the better equipped you are to ask the right questions and understand the answers you get.

Why You Feel Emotionally Numb and What to Do