Need help now? Call our 24/7 confidential hotline 855-520-2898

White question mark icon

How Long Do Opioids & Opiates Stay in Your System?

Written by
Chris Elkins, M.A.
Medically Reviewed By
Ashraf Ali, M.D.
This page features
11 Cited Research Articles

Opiates and opioids can stay in your system for up to one week. Saliva tests can detect most opioids for between 24 and 48 hours. Urine tests can detect opiates and opioids for about seven days, and hair tests can detect the drugs for 90 days.

Numerous factors determine how long opioids and opiates stay in the body. The most influential factors are frequency of drug use and the type of opioid. Short-lasting opiates such as codeine are only detectable for a few days by most drug tests, but long-lasting opioids such as morphine can be detectable for multiple days or one week.

Drug tests are an important tool that caregivers, doctors and therapists use to keep loved ones or patients in recovery from addiction accountable. Knowing that a drug test is on the horizon may deter someone from using opioids and help them maintain sobriety.

But drug tests aren’t perfect, and many of them can produce misleading results if the person administering the test isn’t aware of the detection window for opioid use. For example, hair and urine tests can detect opioids and opiates in the body for longer periods of time than blood or saliva tests.

The term opioid is used to refer to drugs that are similar to chemicals found in the opium plant. The difference between opiates and opioids is that opiates occur naturally. Man-made opioids such as oxycodone, hydrocodone and methadone usually stay in your system longer than opiates.

Saliva, urine and hair can detect opioids for 2 days, 1 week and 90 days, respectively.

Most drug tests can detect opioids for up to seven days. Hairs tests detect opioids for up to 90 days.

Urine tests are the most common types of drug tests, but several factors influence how long opioids are detectable in urine or other fluids. Those factors include:

Purple profile icon

Frequency of use: Opioids are detectable in the bodies of chronic users for longer periods of time than in occasional users.

Teal prescription tablet icon

Type of opioid: Methadone is detectable for longer periods of time than codeine.

Orange syringe needle icon

Dosage: Higher doses are usually detectable for longer periods of time than lower doses.

Purple symptoms list icon

Method of administration: Drugs leave the body more quickly if they’re injected, but intravenous drug use increases the risk of overdose and contracting disease.

Teal kidneys icon

Health: Healthy livers and kidneys remove chemicals from the body faster than unhealthy organs.

Other factors that influence detection include metabolism rate, age and weight. Thus, the amount of time that an opioid is detectable in the body is different for everyone. Still, there are general estimates of how long different types of opioids are detectable.

Struggling with opioid use?

Take the first step toward recovery today.

Syringe full of opioid drugs

How Long Does Heroin Stay in Your System?

Heroin remains detectable in urine for between 24 and 72 hours. The drug can be detected in saliva for between 24 and 36 hours, and it can be found in the hair within five days of use and up to 90 days after last use.

Bottle full of prescription opioid drugs

How Long Does Oxycodone Stay in Your System?

Oxycodone can stay in the body for a few days to a few months. After last use, it remains in the urine for up to three days, in saliva for between 24 and 48 hours, and in the blood for about 25 hours. Hair tests can detect oxycodone about five days after use, and it remains detectable in the hair for about 90 days after last use.

Percocet, a popular painkiller that contains oxycodone, stays in the urine for up to three days, in the blood for about a day and in the hair for up to three months. The effects of Percocet last four to six hours and start within 15 to 30 minutes of administration.

Purple broken pill capsule icon

How Long Does Hydrocodone Stay in Your System?

Hydrocodone can be detected in urine for up to three days. Oral fluid tests can detect hydrocodone for up to two days, and hair tests can detect the drug five days after it’s consumed. It remains in the hair for about three months.

Purple prescription pill tablets icon

How Long Do Opiates Such As Morphine Stay in Your System?

The opiate morphine remains in the urine for about 72 hours after consumption. It can be found in saliva for 24 to 36 hours after use. It takes about five days for morphine to become detectable in hair, and it can be detected for 90 days after last use.

Young girl suffering from addiction to opiates being held by her friend

How Long Opioid Withdrawal Lasts

Patients who take opioids as prescribed by their doctor for short-term pain relief rarely experience withdrawal. Chronic pain patients who take the drugs as prescribed may become dependent and experience mild or moderate withdrawal symptoms after discontinuation.

People who misuse opioids by taking them to get high or taking them in higher doses than prescribed often experience severe crashes or withdrawal when they stop taking the drugs. The length of withdrawal depends on many of the same factors that determine how long a drug stays in the body, such as frequency of use, dosage, type of opioid and method of administration.

The method of administration has a large impact on when withdrawal occurs because withdrawal typically begins once the drug has left the body. The peak effects of opioids are felt when the drugs reach peak blood plasma levels.

In general, peak blood plasma levels are reached after about:

  • 10 minutes when used intravenously.
  • 10 to 15 minutes when snorted (nasal insufflation).
  • 30 to 45 minutes when injected into the muscle.
  • 90 minutes when consumed orally.
  • Two to four hours when absorbed through the skin.

Heroin, which is usually consumed intravenously, can cause withdrawal symptoms within two hours of last use. Because the drug leaves the body more quickly when used intravenously, IV heroin users experience withdrawal more quickly than methadone users.

Methadone is a slow-acting opioid that is usually consumed orally. The withdrawal effects may not occur until 30 hours after last use. The length of withdrawal depends on how frequently the drug was consumed. Chronic heroin users may experience peak withdrawal symptoms after 48 or 72 hours of last use, and withdrawal can last for up to a week.

Withdrawal occurs when the brain adapts to drug use. The brain becomes used to the opioid and reacts negatively when the opioid leaves the system. That’s why withdrawal can last longer than the time it takes for opioids to leave the body. It takes time for the brain to recover from its dependency on the opioid.

Looking for heroin rehab?

Get help with your addiction today!

How Opioids Are Metabolized

The metabolism process determines how quickly a drug enters and leaves a person’s body. When taken orally, most opioids experience first-pass metabolism, meaning a significant portion of the opioid is metabolized by the liver or stomach wall before it enters blood circulation, according to a 2009 article on opioid metabolism published in the journal Mayo Clinic Proceedings. Intravenous or transdermal administration causes the opioid to immediately enter the blood stream before being metabolized.

Metabolites, a byproduct of the metabolism process, are usually attached to chemicals such as glucuronic acid before being excreted. However, some chemicals are directly excreted in the urine.

For example, heroin is metabolized by the liver, kidneys, brain and heart into a chemical called 6-monoacetylmorphine, more commonly known as 6-MAM. The body converts 6-MAM into morphine, and morphine is metabolized by the liver. After morphine is metabolized, the chemical is either excreted in the urine or feces as morphine or it’s attached to glucuronic acid and then excreted. 6-MAM can also be excreted in urine or feces.

Because morphine is a byproduct of heroin, the presence of morphine in a drug test can indicate either heroin or morphine use. 6-MAM is only a byproduct of heroin.

Some opioids, such as heroin or codeine, produce active metabolites that are more potent than the original compound. Heroin and codeine are metabolized into morphine, which can have euphoric or pain-relieving effects on the brain. If the drugs reach the brain before being metabolized, the effects are less noticeable.

Opioid Metabolite Chart
Drug Name Primary Metabolite Minor Metabolite
Heroin 6-MAM, morphine ——
Morphine —— Hydromorphone
Codeine Morphine Hydrocodone
Hydrocodone Hydromorphone, norhydrocodone Dihydrocodeine
Hydromorphone —— ——
Oxycodone Oxymorphone, noroxymorphone ——
Naloxone Noroxymorphone ——

Source: Mayo Clinic Drug Test Catalog

Each person’s metabolic rate affects how mildly or severely they experience a drug’s effects. For example, someone who struggles to metabolize codeine may not feel the drug’s effects because the body converts only a small amount of the drug into the active metabolite morphine. On the other hand, people who rapidly metabolize codeine can end up with a dangerously high level of morphine in their system.

Metabolism rates can affect drug tests because someone with a high amount of morphine caused by rapid metabolism of codeine could be suspected of using heroin. However, that scenario is rare.

Some stores and websites sell products that claim to help a person remove opioids or opioid metabolites from a person’s body. Over-the-counter detox products are unlikely to help you pass a drug test. Changes in diet or exercise may cause minor changes in the way your body removes opioids from its system, but at-home detox strategies don’t cause significant changes.

If you are worried about passing a drug test because you’re struggling to abstain from opioid use, you should seek treatment for addiction. Addiction to prescription drugs such as opioids can be difficult to overcome without professional assistance. Through supervised detox and therapy, you can recover from addiction.

5/5 Stars, 5 Votes
Kim Borwick, M.A.
Kim Borwick, M.A., Editor,
Medical Reviewer
Ashraf Ali
Psychiatrist, Los Angeles County Department of Mental Health

Was this article helpful?

How helpful would you rate this article?

What could this article improve on?

    loading logo

    Thanks for helping us make our website better for visitors like you!

    View Sources

    Ready to make a change?

    Get cost-effective, quality addiction care that truly works.

    Start Your Recovery
    Question mark symbol icon

    Who am I calling?

    Calls will be answered by a qualified admissions representative with Advanced Recovery Systems (ARS), the owners of We look forward to helping you!

    Question mark symbol icon

    Who am I calling?

    Phone calls to treatment center listings not associated with ARS will go directly to those centers. and ARS are not responsible for those calls.

    Start your path to recovery today! Call now for 24/7 confidential help.