How Long Do Opiates Stay in Your System?

how long do opiates stay in your systemAccording to the National Institute on Drug Abuse (NIDA), opioids were responsible for 80,411 overdose deaths in 2021.[1]

While people often use the terms opiates and opioids interchangeably, they actually mean different times. Opioids refer to all opioids, whether they are natural, semi-synthetic, or synthetic. On the other hand, opiates only refer to natural opioids like heroin, morphine, and codeine.[2]

There are prescription opiates like morphine and codeine and illicit ones such as heroin. Both prescription and illicit opiates are habit-forming and addictive when abused. Oftentimes, people begin abusing prescription opiates after experiencing an injury or surgery and then end up switching to heroin once they run out of their prescription.

Regardless of what opioid was being abused and for what purpose, all opioids can show up on a drug test. How long opiates stay in your system depends on the dose you took, your metabolism, and other factors.

What are Opiates and How Long Do Their Effects Last?

Opiates are a subcategory of opioids that only include the naturally occurring ones. For example, heroin, codeine, and morphine are considered opiates while semi-synthetic opioids like oxycodone and fully synthetic opioids like fentanyl are not.

While opiates are considered all-natural, they still cause similar effects as other opioids. The common effects of opiates include:

  • Pain relief
  • A rush of euphoria
  • Dizziness and drowsiness
  • Nausea and vomiting
  • Constipation
  • Slowed breathing and heart rate

How long the effects of an opiate last will depend on the specific opiate you are using. For example, the effects of codeine may last up to three hours.[3] On the other hand, the effects of morphine last up to 6 hours and heroin can last up to five hours.

Additionally, how you use the opiate you are abusing will affect the length of the effects. For example, if you are injecting heroin intravenously, the effects will begin faster but be more short-lived than if you were to smoke it.

How Long Do Opiates Remain in Your System?

How long opiates remain in your system depends on a variety of factors, including which opiate you are using, the rate of your metabolism, the dose you take, and how often you consume them.

The first thing you should understand is each opiate has its own half-life. A half-life refers to how long it takes your body to eliminate half of the substance. Typically, it takes 4 to 5 half-lives for an opiate to be completely eliminated from your body.

The half-life of codeine is about 3 hours, which means it can take 15 hours for your body to eliminate it.[4] Similarly, the half-life of morphine is between 2 to 4 hours, meaning it can take up to 20 hours for your body to remove it.[5] And lastly, heroin’s half-life depends on how it is taken, with inhalation use having a half-life of 7 to 21 minutes.[6]

While opiates are usually out of your system anywhere from 2 hours to 20 hours depending on the specific drug, they can leave behind metabolites in your system that drug tests look for. Additionally, each type of drug test can detect opiates for varying amounts of time.


Urine testing is the most commonly used drug test to detect opiates. While morphine and codeine can be detected in your urine for 3 days, heroin can only be detected for less than 24 hours.


Saliva drug tests are less commonly used because they are not as reliable as urine screenings. Typically, opiates can be detected in your saliva for up to 2 days after your last use.


Blood tests are most commonly used in hospital settings to determine if drug use is contributing to someone’s symptoms. While heroin can only be detected for about 15 minutes after your last dose, blood tests can detect codeine for up to 4 hours and morphine for up to 7 hours.


Hair tests are not commonly used because they are invasive and expensive to send off to the lab. However, high-clearance jobs might require you to take a hair follicle drug test before they offer you employment. These tests can detect any drug in your system (including opiates) for up to 90 days after your last dose.

Find Help for Opiate Addiction

If you or a loved one abuse opiates, it’s time to seek professional help. Opiate addiction can significantly impact every area of your life, making it hard to function in your daily life. Thankfully, opiate rehab programs can provide you with the tools and support you need to overcome opiate addiction.

To learn more about our opiate rehab program in San Antonio, contact Alamo Behavioral Health today.


  1. The National Institute on Drug Abuse (NIDA): Drug Overdose Death Rates, Retrieved October 2023 From
  2. The Centers for Disease Control and Prevention (CDC): Commonly Used Terms, Retrieved October 2023 From
  3. The Government of Canada: Codeine, Retrieved October 2023 From
  4. The Food and Drug Administration (FDA): Codeine Label, Retrieved October 2023 From
  5. The Food and Drug Administration (FDA): Morphine Label, Retrieved October 2023 From
  6. The National Library of Medicine (NLM): Population pharmacokinetics of heroin and its major metabolites, Retrieved October 2023 From

“Huge thanks to the friendly staff”

Seeking help at Alamo Behavioral Health was the single best decision of my life. The clinical team is amazing, and other staff members are friendly and really do their best to create a supportive environment. I have a long way to go, but I know that I'm not alone, thanks to everyone at Alamo.

Jeremy Atkins

5.0 Stars

Take the first step

how it works

Transform your life with one call

Reach out to our detox center in San Antonio and jumpstart your recovery. Our all-inclusive inpatient rehab for veterans in Texas is there for you.

how it works

Explore our treatment options

Discuss your treatment and insurance options with your San Antonio rehab advisor and find the most effective recovery program for you.

how it works

Schedule Your Admission Date

Let us help you regain control of your life today! Move forward with your treatment in one of the most serene detox centers in San Antonio.