In crisis? Call or text 988 any time. Overdose or emergency: call 911.
Diagnosis & Testing

How Long Do Opioids Stay in Your System?

Most opioids show up in urine for about one to four days, but methadone and buprenorphine can last a week or more. Here is a drug-by-drug table and what it means for testing and safety.

Key takeaways

  • Most short-acting opioids, such as oxycodone, hydrocodone and heroin, are detectable in urine for roughly one to three days.
  • Methadone and buprenorphine last longer, often up to about a week, and longer still with regular maintenance use.
  • A standard "opiate" screen reliably catches morphine, codeine and heroin, but often misses oxycodone and does not detect fentanyl, methadone or buprenorphine.
  • Hair tests can reflect about three months of use; saliva and blood reflect only recent use.
  • Opioid effects, including dangerously slowed breathing, end long before a test turns negative. Carry naloxone and call 911 for any suspected overdose.

“Opioids” covers a wide family of drugs, from prescription pain relievers like oxycodone and hydrocodone to heroin, methadone and buprenorphine. They don’t all behave the same way on a drug test. So how long do opioids stay in your system? For most short-acting opioids, urine tests can detect use for about one to three days. Longer-acting medicines such as methadone and buprenorphine can show up for a week or more. Whether a test catches a particular opioid at all depends on which panel the lab runs. This guide gives a drug-by-drug table, explains why tests miss some opioids, and covers the safety points that matter more than any test result.

Opioid detection times at a glance

In urine, the most common test, most short-acting opioids are detectable for roughly one to three days after last use. A 2017 consensus document from the American Society of Addiction Medicine (ASAM) gives urine windows of about 1 to 1.5 days for immediate-release oxycodone, 1 to 2 days for hydrocodone, 1 to 3 days for heroin’s marker 6-MAM, 2 to 4 days for methadone and up to about 7 days for buprenorphine.

The ASAM figures in the table below are compiled from several studies, each using its own lab cutoff, which is why some drugs have more than one range. Treat them as typical ranges, not guarantees. Detection depends on the dose, how often someone uses, their metabolism and the test itself.

Opioid What the test looks for Typical urine window Source
Oxycodone (immediate-release, such as Roxicodone or in Percocet) Oxycodone; often needs its own test About 1 to 1.5 days; other studies cited report 1 to 4 days ASAM, 2017
Oxycodone (extended-release, such as OxyContin) Oxycodone About 1.5 to 3 days ASAM, 2017
Hydrocodone (such as Norco or Vicodin) Hydrocodone and hydromorphone About 1 to 3 days ASAM, 2017
Hydromorphone (Dilaudid) Hydromorphone About 1 to 4 days ASAM, 2017; MedlinePlus
Morphine Morphine About 1 to 3 days; up to 5 days in some studies ASAM, 2017; Hadland and Levy, 2016
Codeine Codeine and morphine About 1 to 4 days ASAM, 2017; Hadland and Levy, 2016
Heroin 6-MAM (heroin-specific) and morphine 6-MAM about 1 to 3 days; morphine about 1 to 3 days ASAM, 2017; Hadland and Levy, 2016
Methadone Methadone and its metabolite EDDP; needs its own test About 2 to 7 days; 3 to 11 days with regular maintenance doses ASAM, 2017; MedlinePlus
Buprenorphine (such as Suboxone) Buprenorphine and norbuprenorphine; needs its own test About 4 to 7 days ASAM, 2017
Fentanyl Fentanyl and norfentanyl; needs its own test About 1 to 3 days in older data; can be much longer with regular use ASAM, 2017; see our fentanyl guide

MedlinePlus, the National Library of Medicine’s consumer site, gives similar urine figures: 1 to 2 days for codeine, heroin, hydromorphone and morphine, and 2 to 3 days for methadone.

A note on fentanyl

Newer research suggests the short fentanyl window in older tables may underestimate how long it lingers in people who use it often. Our guide to how long fentanyl stays in your system covers that research in detail.

Detection by test type: urine, saliva, blood and hair

The type of sample matters as much as the drug. ASAM notes that, in general, the longest windows of detection occur in hair, followed by sweat, urine, oral fluid (saliva) and blood.

Test How it is used General window for opioids Source
Urine The most common test in workplaces, clinics and treatment programs About 1 to 3 days for most opioids; longer for methadone and buprenorphine ASAM, 2017
Saliva (oral fluid) Collected with a swab; harder to tamper with About 1 to 36 hours for heroin, morphine and codeine Hadland and Levy, 2016
Blood Mostly used in emergencies and investigations Usually within about 2 to 12 hours of use Hadland and Levy, 2016 (general figure)
Hair Shows longer-term patterns; does not show very recent use Up to about 90 days Hadland and Levy, 2016; ASAM, 2017
Sweat patch Worn on the skin for days to weeks Covers the time the patch is worn, usually 1 to 2 weeks ASAM, 2017

Hair can take about a week after use before drug traces appear above the scalp, according to ASAM, so a hair test won’t show use from the past few days.

Why a standard “opiate” test may miss some opioids

Many people assume a drug test either detects “opioids” or it doesn’t. In reality, each test is built to recognize particular chemicals.

The common five-drug workplace panel includes “opiates,” which Hadland and Levy describe as heroin, morphine and codeine, but not synthetic opioids such as oxycodone, hydrocodone, buprenorphine or methadone. ASAM explains that standard opiate tests detect morphine and codeine best. They pick up hydrocodone and hydromorphone moderately well, catch oxycodone poorly, and do not detect fentanyl, meperidine, methadone or buprenorphine at all. Those drugs need their own tests.

This is why many labs run expanded panels, and why a clinic prescribing buprenorphine or methadone uses tests designed for those medicines. ASAM also notes that heroin and codeine both break down into morphine, so a morphine result alone cannot say which drug was taken. Confirming heroin specifically requires finding 6-MAM, a marker that only heroin produces.

Screening tests vs confirmation tests

MedlinePlus explains that screening tests only show whether opioids are present, not which kind or how much, and that positive screens can be false positives. Follow-up confirmation testing, usually done in a lab, can identify the specific drug. ASAM adds that a negative result does not necessarily mean no drug is present. It can mean the amount was below the test’s cutoff.

What changes how long opioids are detectable

How the body processes opioids

Hadland and Levy describe the basic path. A swallowed drug is absorbed through the gut and carried to the body’s tissues, while a drug that is injected, smoked or snorted skips the gut and reaches the tissues right away. Many drugs dissolve in fat rather than water, so the liver changes them into water-soluble forms, called metabolites, that the kidneys can pass into urine.

That process explains why different samples tell different stories. Blood generally shows the drug itself and reflects only the last few hours. Urine mostly shows metabolites, so it covers a longer stretch. Hair traps metabolites as it grows, which is why it can show months of use but not the past week. The authors note that detection windows vary between drugs largely because of how fat-soluble each one is.

This is also why one opioid can show up as another on a test. ASAM notes that codeine and heroin both break down into morphine, and hydrocodone is tested partly through its metabolite hydromorphone, as the table above shows.

The main factors

  • Which opioid. Long-acting drugs like methadone stay in the body longer than short-acting ones like oxycodone.
  • Immediate- vs extended-release. ASAM lists a longer window for extended-release oxycodone than for immediate-release.
  • How much and how often. Regular, heavy use generally extends the window. ASAM’s methadone range is much longer for people on daily maintenance doses.
  • The lab’s cutoff. A lower cutoff detects smaller amounts, so the same sample may be positive at one lab and negative at another.
  • Your body. MedlinePlus notes that opioid results can be affected by how fast your body uses opioids, other medicines you take and how labs run the tests.

Prescriptions, poppy seeds and false positives

If you take a prescribed opioid, tell the person or organization testing you, and bring your prescription details. MedlinePlus explains that providers may use opioid testing to make sure a prescribed medicine is being taken as directed, so a positive result for your own medicine is expected in that setting.

Some foods and medicines can affect results. ASAM notes that poppy seeds contain small amounts of morphine and can, rarely, cause a positive opiate screen, and that certain cough suppressants and antidepressants have been reported to cause false positives. MedlinePlus advises telling the tester about any prescription or over-the-counter medicines before the test. If you get a result you don’t expect, ask for a confirmation test.

This page does not offer ways to beat or pass a drug test. If you are worried about a test because you are struggling with opioid use, that worry is worth talking about with a doctor or counselor. It may be the start of getting help.

The effects wear off long before the test turns negative

The danger of opioids is concentrated in the hours after use, when breathing can slow or stop. The traces a urine or hair test finds stay much longer. That gap matters in two ways.

First, a negative test doesn’t mean someone is safe to use again at their old amount. After even a short break, tolerance drops. MedlinePlus warns that most opioid overdose deaths occur in people who have just detoxed, because they can overdose on a much smaller amount than they used to take.

Second, long-acting opioids like methadone can cause dangerous sedation for longer than people expect, especially when mixed with alcohol or sedatives such as Xanax. Our guide to how long Xanax stays in your system explains why that combination is risky.

Responding to an opioid overdose

MedlinePlus lists slow, shallow breathing and very low blood pressure as signs of a possible overdose, and very small pupils as a common sign of opioid use. A person who can’t be woken, or whose lips or fingernails turn blue or gray, needs help immediately. If you see these signs:

  1. Call 911Do this right away.
  2. Give naloxoneNaloxone (such as Narcan) is sold over the counter. Follow the package directions.
  3. Keep them breathingTry to keep the person awake. If they are breathing but not responsive, lay them on their side.
  4. Stay with themNaloxone can wear off before the opioids do, so breathing can slow again.

The CDC advises staying with the person until emergency help arrives, or for at least 4 hours, to make sure their breathing returns to normal. Our guide to how to use Narcan walks through each step.

Where to get help

If you are reading this because opioid use has become hard to control, effective treatment exists. NIDA reports that people with opioid use disorder who are treated with methadone or buprenorphine are less likely to die or to have an overdose than those who do not receive treatment. Our guides to opioid addiction, medication-assisted treatment and the opioid withdrawal timeline explain what to expect, and our addiction guide covers the bigger picture.

FindTreatment.gov and SAMHSA’s free, confidential National Helpline at 1-800-662-4357 can connect you with local care, including programs that offer medication. In an emergency, call 911. If you are in emotional crisis, call or text 988.

Frequently asked questions

How long does oxycodone stay in your urine?

ASAM lists about 1 to 1.5 days for immediate-release oxycodone and about 1.5 to 3 days for extended-release forms, with some studies reporting longer. Many standard opiate screens detect oxycodone poorly, so labs often use a separate oxycodone test.

Does methadone show up on a regular drug test?

Usually not. ASAM states that methadone is not detected by a standard opiate test and needs its own test. When tested for, it can be found for about 2 to 7 days, and longer with daily maintenance doses.

Will Suboxone show up on a drug test?

Only if the lab tests for buprenorphine specifically. A standard opiate screen does not detect it. Buprenorphine tests can usually detect it for about 4 to 7 days, according to ASAM.

Can poppy seeds cause a positive opioid test?

Rarely. Poppy seeds contain small amounts of morphine. ASAM notes that federal workplace cutoffs are designed to avoid positives from poppy seeds, but tests with lower cutoffs may pick them up. Tell the tester if you have eaten them.

How long do opioids stay in hair?

Hair tests can reflect up to about 90 days of use. Traces take about a week to appear in hair, so very recent use won’t show.

Is it safe to use again once a test is negative?

No. Tolerance drops quickly after a break, so the same amount can cause an overdose. If you use, never use alone, carry naloxone and call 911 for any suspected overdose.

Sources

  1. Appropriate Use of Drug Testing in Clinical Addiction Medicine (ASAM, 2017)
  2. Objective Testing: Urine and Other Drug Tests (Hadland and Levy, 2016, PMC)
  3. Toxicology Screen (MedlinePlus Medical Encyclopedia)
  4. Opioid Testing (MedlinePlus Medical Tests)
  5. Lifesaving Naloxone (CDC)
  6. Medications for Opioid Use Disorder (NIDA)

This article is for general information and is not medical advice. If you are worried about your health or someone else’s, talk to a doctor or call one of the free helplines below.

Written by

Web Admin

Every guide is researched, cited and reviewed under our editorial policy.

Related guides

More in Diagnosis & Testing

Ready to talk to someone?

Free and confidential. Calling is not a commitment to anything.

Call now 1-800-662-4357

This number is SAMHSA’s National Helpline, a free, confidential, 24/7 service of the U.S. government. Gratitude House is not affiliated with SAMHSA.

Call now 1-800-662-4357