Trimethoprim-sulfamethoxazole (Generic Bactrim): Uses, Side Effects, Dosages, Contra-indications, Warnings, Interactions & More

By Terez Malka, MD
Medically reviewed checkmarkMedically reviewed
June 29, 2021

Bacterial infections sometimes require pharmaceutical treatment, such as antibiotic medications. One common medication prescribed by doctors is trimethoprim-sulfamethoxazole (sometimes called co-trimoxazole or TMP/SMX), the generic form of Bactrim.

Trimethoprim with sulfamethoxazole works by destroying bacteria in the body, which can alleviate bacterial infections.

As with any medication, trimethoprim-sulfamethoxazole is not for everyone. Your doctor will determine if it’s the right treatment based on your infection, health history, and current medications, among other things.

To help you be an informed patient—and to make prescription medicine more transparent—this article will address what trimethoprim-sulfamethoxazole is, what it’s used for, potential side effects, and how to take it.

Talk to a doctor online

Refill medications and get certain necessary prescriptions.

Start now

What Is Trimethoprim-sulfamethoxazole?

Trimethoprim-sulfamethoxazole, or generic Bactrim, is an FDA-approved prescription antibiotic medication.

A combination of two types of antibiotics, TMP/SMX treats common bacterial infections, including serious types of pneumonia called pneumocystis jiroveci pneumonia and pneumocystis carinii pneumonia (PCP). 

Trimethoprim-sulfamethoxazole works by decreasing the bacteria infecting a person’s body. The two active ingredients work together to prevent a chemical many bacteria need to grow.

Once production of that chemical ceases, the bacteria also stops growing, which can help resolve an infection.

What Is It Used For? 

Trimethoprim-sulfamethoxazole is an antibacterial drug used to treat infectious diseases in the body caused by bacteria. Doctors commonly prescribe it for: 

  • Urinary tract infections (UTIs), including those caused by Escherichia coli (e.coli)
  • Otitis media (middle ear infections) in children
  • Traveler’s diarrhea 
  • Shigellosis or shigella (bacillary dysentery)
  • Chronic bronchitis flare-ups
  • Acne vulgaris
  • Methicillin-resistant staphylococcus aureus (also known as MRSA), a type of staph infection
  • Pneumocystis jiroveci pneumonia or pneumocystis carinii pneumonia (two serious types of pneumonia in people with compromised immune systems, such as those undergoing treatment for cancer or people living with HIV)

Antibiotics, including trimethoprim-sulfamethoxazole, don’t work for viral infections such as the common cold and influenza.

Additionally, taking antibiotics too much or to try to prevent disease can result in antibiotic resistance. This is when bacteria develop a way to outlive medications meant to kill them, making the treatment obsolete.

Can You Get Trimethoprim-sulfamethoxazole Online?

Since trimethoprim-sulfamethoxazole is a prescription antibiotic medication, you need a healthcare provider’s prescription to get it. 

You can take your prescription to an online pharmacy to purchase the drug online; however, it’s important that you only get medication from a licensed pharmacy that requires a prescription from a doctor. 

If you don’t want to see a doctor in person or you don’t have access to one, you can chat with a K doctor, who may prescribe an antibiotic based on your symptoms.

What Forms Does Trimethoprim-sulfamethoxazole Come In?

Trimethoprim-sulfamethoxazole comes in two forms: liquid and tablet. It’s generally taken by mouth. Your doctor will instruct you on the best way to take your medication.

Make sure to follow their instructions and finish the course of treatment, even if you start to feel better after a few days. If you don’t take all of the medication, you may not completely kill off the bacteria, and the infection could return.

What Are Common Dosages of Trimethoprim-sulfamethoxazole?

Your doctor will work with you to determine the appropriate dosage of trimethoprim-sulfamethoxazole based on your infection, its severity, and your general health.

Common dosing for adults and children older than two months of age include: 

  • For shigellosis or urinary tract infections: 800 milligrams (mg) of sulfamethoxazole and 160 mg of trimethoprim every 12 hours for 5 days (for shigellosis) or 14 days (for UTIs)
  • For chronic bronchitis flare-ups: 800 mg/160 mg every 12 hours for 10-14 days
  • To treat pneumocystis jirovecii pneumonia or pneumocystis carinii pneumonia: The dose varies by weight (usually 75-100 mg of sulfamethoxazole and 15-20 mg of trimethoprim per kilogram of body weight) and is taken every 6 hours for 14-21 days 
  • To prevent pneumocystis jirovecii pneumonia or pneumocystis carinii pneumonia: 800 mg/160 mg once daily
  • For traveler’s diarrhea: 800 mg/160 mg every 12 hours for five days
  • For shigellosis, middle ear infections, or UTIs in children: 40mg/8mg every 12 hours for 5 days (for shigellosis) or 10 days (for acute ear infections and UTIs)

Side Effects of Trimethoprim-sulfamethoxazole

All medications come with a risk of unwanted side effects. Your doctor or pharmacist should give you a heads up about these. The most commonly reported side effects of trimethoprim-sulfamethoxazole are: 

More rarely, people who take trimethoprim with sulfamethoxazole experience serious side effects. Talk to your doctor right away if you have any of the following: 

And if you have experience of the below allergic reaction symptoms, call 911 or seek emergency care: 

How to Take Trimethoprim-sulfamethoxazole

Follow your doctor’s instructions, including how much to take and when, when prescribed trimethoprim-sulfamethoxazole. It’s important, too, to finish your course of treatment even if you begin to feel better. 

To reduce the risk of unwanted side effects, drink a glass of water when you take trimethoprim-sulfamethoxazole and continue to drink water throughout the day. 

If you forget to take trimethoprim-sulfamethoxazole, take it as soon as you remember. But if it’s almost time for your next dose, wait until that time to take a single dose. Don’t take extra to make up for the dose you missed. 

Contraindications

It’s always important to inform your healthcare provider about your medical history. In any of the following situations, be especially sure to talk to your doctor before taking trimethoprim-sulfamethoxazole: 

  • Pregnancy: Trimethoprim-sulfamethoxazole can harm unborn babies, so take an effective birth control to prevent pregnancy during your course of treatment. Immediately tell your doctor if you may be pregnant while you’re using trimethoprim-sulfamethoxazole.
  • Breastfeeding: This medication can harm babies through breast milk.
  • Diabetes: Trimethoprim-sulfamethoxazole can interfere with glucose production and certain oral diabetes medications.
  • Anticonvulsant treatment: People taking medications to prevent seizures, such as phenytoin, could be at risk for vitamin B9 (folate, or folic acid) deficiency.
  • High potassium (hyperkalemia): TMP/SMX can increase potassium levels in the blood.
  • Infants: Clinicians prescribe trimethoprim-sulfamethoxazole for pediatric bacterial infections, but babies under two months of age should not take this medication.

Talk to a doctor online

Refill medications and get certain necessary prescriptions.

Start now

Drug Interactions

Not all medications play nicely together. Sometimes taking trimethoprim-sulfamethoxazole in addition to other drugs can cause serious interactions.

Be sure your doctor knows if you’re currently taking any medications, particularly those below.

  • ACE inhibitors
  • Blood thinners
  • Oral diabetes medication
  • Diuretics
  • Leucovorin
  • Indomethacin
  • Anticonvulsants
  • Memantine
  • Methotrexate
  • Pyrimethamine

Warnings

Along with less serious side effects, trimethoprim-sulfamethoxazole can cause more adverse effects, including serious, life-threatening medical problems in some people.

It’s normal to experience some gastrointestinal discomfort on antibiotics, but if you have diarrhea for more than two weeks or an exacerbation of your GI symptoms, talk to your healthcare provider or chat with a K doctor.

Some patients may experience serious skin reactions. If you have any of the following symptoms, talk to a doctor or seek medical care right away: 

  • Skin rash 
  • Blistering
  • Peeling
  • Loosening skin 
  • Itching 
  • Red skin lesions
  • Sores
  • Ulcers
  • White spots in your mouth or lips

In some people, this medication can cause liver problems. Seek medical treatment if you have these symptoms: 

  • Darkening urine
  • Lightening stool 
  • Stomach pain
  • Jaundice (yellowing eyes or skin)

People who take higher doses of trimethoprim-sulfamethoxazole, especially for prolonged periods, could be at risk for reduced platelet count. Consult with your doctor if you experience: 

All medications come with a risk of severe allergic reactions, which require immediate emergency medical care. Call a doctor or go to the emergency room if you have any of the following adverse reactions: 

  • Itching
  • Swelling in your mouth, throat, or tongue
  • Difficulty breathing
  • Chest pain

Lastly, trimethoprim-sulfamethoxazole can affect certain medical tests. If you need lab work done at the doctor or dentist, tell the provider that you’re taking this antibiotic. 

How K Health Can Help 

Did you know you can access online urgent care with K Health?

Check your symptoms, explore conditions and treatments, and if needed, text with a healthcare provider in minutes. 

K Health’s AI-powered app is based on 20 years of clinical data.

Frequently Asked Questions

What is trimethoprim-sulfamethoxazole used to treat?
Trimethoprim-sulfamethoxazole is used to treat a variety of bacterial infections, from ear infections, urinary tract infections, and traveler’s diarrhea to more serious infections like pneumonia. If you have a bacterial infection, your doctor will work with you to determine whether trimethoprim-sulfamethoxazole is an appropriate course of treatment.
How long does trimethoprim-sulfamethoxazole stay in your system?
Every drug has a half life, which is the amount of time it takes for the medication to reduce to half of the initial dose. The half life of trimethoprim is about 8-10 hours, and the half life of sulfamethoxazole is about 10 hours.
Should you drink a lot of water when you take trimethoprim-sulfamethoxazole?
Drinking extra water when you take trimethoprim-sulfamethoxazole may help prevent unwanted side effects. Follow your doctor’s instructions, but overall it’s best to take the medication with a full glass of water. And it never hurts to drink water throughout the day to promote hydration.
How long does it take for trimethoprim-sulfamethoxazole to work?
Your body will start to absorb trimethoprim-sulfamethoxazole immediately when you start taking it, and it will start to kill bacteria within about four hours of your first dose. Generally, people start to feel better within a few days of taking trimethoprim-sulfamethoxazole, but it can take up to a few weeks if you have a complicated diagnosis like pneumonia. Even if you start to feel better, follow your doctor’s instructions and continue taking your medication until it’s gone.
K Health articles are all written and reviewed by MDs, PhDs, NPs, or PharmDs and are for informational purposes only. This information does not constitute and should not be relied on for professional medical advice. Always talk to your doctor about the risks and benefits of any treatment.

Terez Malka, MD

Dr. Terez Malka is a board-certified pediatrician and emergency medicine physician.

Close button

Refill medications and get certain necessary prescriptions with K Health from home.

Start Now
Image of pill bottle