Bactrim (Sulfamethoxazole and Trimethoprim) – Oral

What Is Bactrim?

Bactrim (sulfamethoxazole and trimethoprim) is an oral prescription drug used to treat various bacterial infections, such as urinary tract infections, ear infections, and bronchitis.

Bactrim is in a drug class called sulfonamide antibiotics. It is a combination medication containing sulfamethoxazole and trimethoprim. It works by stopping the growth of bacteria.

It is available as an oral tablet and oral suspension.

Drug Facts

Generic Name: Sulfamethoxazole and trimethoprim

Brand Name(s): Bactrim, Bactrim DS, Septra, Septra DS, Sulfatrim, Sulfatrim Pediatric

Drug Availability: Prescription

Administration Route: Oral

Therapeutic Classification: Sulfonamide (sulfa) antibiotic

Available Generically: Yes

Controlled Substance: N/A

Active Ingredient: Sulfamethoxazole and trimethoprim

Dosage Form(s): Tablet, suspension

What Is Bactrim Used For?

The Food and Drug Administration (FDA) approved Bactrim to treat certain bacterial or fungal infections, such as:

  • Urinary tract infections (UTIs)
  • Middle ear infections (otitis media)
  • Acute exacerbations (worsening) of chronic bronchitis in adults
  • Shigellosis (an infection that causes diarrhea, fever, and stomach cramps)
  • Pneumocystis jirovecii pneumonia (a serious fungal infection that usually occurs in people who are immunocompromised, for example, from human immunodeficiency virus or HIV/AIDS or from taking steroids)
  • Traveler's diarrhea in adults

Bactrim does not treat viral infections such as the common cold, flu, or COVID-19.

How to Take Bactrim

If you are prescribed Bactrim, read the label and the information leaflet that comes with your prescription. Consult your healthcare provider if you have any questions.

Use Bactrim exactly as directed by your healthcare provider, and do not skip doses. Take your medication for the full length of time prescribed, even if you are feeling better. Skipping doses or stopping the medicine too soon can cause antibiotic resistance.

Drink plenty of fluids while taking Bactrim to prevent kidney stones—one potential side effect of this medication. Antibiotics such as Bactrim can also cause diarrhea. Severe diarrhea can occur, even up to two months (or longer) after finishing the antibiotic. Call your healthcare provider immediately if you have watery or bloody diarrhea. They may order blood and urine tests and direct you to stop taking medicine based on the results.

Storage

Store Bactrim at room temperature (between 68 and 77 degrees F), away from heat, direct light, and moisture. Keep this medication out of reach of children and pets. Keep the bottle tightly closed when not in use.

Off-Label Uses

Healthcare providers may prescribe Bactrim for the following off-label uses (unapproved uses of an FDA-approved drug):

  • Bacterial meningitis (an infection around the membranes of the brain and spinal cord)
  • Acute salmonellosis (an infection due to contaminated food or water)
  • Severe yersiniosis (an infection due to contaminated raw or undercooked pork)
  • Typhoid fever (very rare in the United States; infection due to contaminated food or water)
  • Toxoplasmosis (an infection caused by eating undercooked contaminated meat, or by exposure to infected cat feces, or mother-to-child transmission during pregnancy)
  • Pertussis (also known as whooping cough, a highly contagious respiratory disease with a "whoop" sound when coughing)
  • Granuloma inguinale (a rare sexually transmitted infection that causes genital inflammation and scarring)
  • Cyclosporiasis (infection due to food or water that is contaminated by a protozoan parasite)

How Long Does Bactrim Take to Work?

Bactrim takes about one to four hours to reach its highest levels in the body after a dose. You may start to feel better within a few days, but it is important to finish the full course of therapy prescribed.

What Are the Side Effects of Bactrim?

This is not a complete list of side effects, and others may occur. A healthcare provider can advise you on side effects. If you experience other effects, contact your pharmacist or a healthcare provider. You may report side effects to the FDA at www.fda.gov/medwatch or 800-FDA-1088.

Common Side Effects

The most common side effects of Bactrim are:

  • Stomach problems: Nausea, vomiting, diarrhea, and indigestion
  • Appetite loss
  • Allergic skin reactions, such as a rash and hives
  • Sensitivity to the sun
  • Dizziness
  • Headache
  • Lethargy (lack of energy and motivation)

Severe Side Effects

Call your healthcare provider immediately if you have serious side effects. Dial 911 if your symptoms feel life-threatening or if you think you’re having a medical emergency. Serious side effects and their symptoms can include the following:

  • Hypersensitivity reaction or anaphylaxis: Symptoms that include rash, hives, facial swelling, and difficulty breathing
  • Stevens-Johnson syndrome/toxic epidermal necrolysis: Severe and life-threatening skin reactions that can cause fever, burning eyes, sore throat, red or purple rash, and blistering and peeling skin
  • Drug reaction with eosinophilia and systemic symptoms (DRESS): A drug reaction that can have symptoms of rash and fever, and can involve organs
  • Acute generalized exanthematous pustulosis (AGEP): A rare drug reaction that causes fluid-filled blisters on the skin
  • Acute febrile neutrophilic dermatosis: An uncommon skin condition that causes fever and a painful rash on the arms, face, and neck
  • Fulminant hepatic necrosis: A very rapid and sudden liver failure
  • Low blood cell counts: Be alert for fever, chills, mouth or skin sores, easy bruising/unusual bleeding, pale skin, cold hands and feet, light-headedness, or shortness of breath
  • Low platelet levels
  • Sun sensitivity
  • Liver problems: Symptoms can include tiredness, stomach pain, and yellowing of the skin and whites of the eyes (jaundice)
  • Inflammation of the pancreas
  • Kidney problems/kidney failure
  • Lung and breathing problems
  • High levels of potassium in the blood: Symptoms that include nausea, weakness, tingling, chest pain, irregular heartbeats, and loss of movement
  • Low levels of sodium in the blood: Symptoms that include headache, confusion, difficulty with thinking or memory, weakness, and feeling unsteady
  • Aseptic meningitis: Serious inflammation of the lining of the brain
  • Seizures
  • Lupus erythematosus: A condition in which the immune system attacks its own tissues and can affect the joints, skin, brain, lungs, kidneys, and blood vessels
  • Low blood sugar
  • C. difficile-associated diarrhea (antibiotic-associated diarrhea)
  • Rhabdomyolysis (muscle breakdown, which can cause kidney damage and can lead to death)

Long-Term Side Effects

While many people tolerate Bactrim well, long-term or delayed side effects are possible, especially if taken for an extended period. Some long-term side effects can be mild, such as: 

  • Sun sensitivity
  • Ringing in the ears
  • Joint pain
  • Appetite loss
  • Red/purple rash
  • Sore throat
  • Cough

Moderate long-term side effects can include: 

  • Blood cell disorders
  • Impaired coordination
  • Depression
  • Crystals in the urine
  • Mouth sores
  • Liver problems
  • Jaundice (yellowing of the skin and whites of the eyes)
  • Lung problems
  • Antibiotic-associated diarrhea

Severe long-term side effects can consist of: 

  • Blood cell disorders
  • Severe, life-threatening skin reactions
  • Serum sickness (a drug reaction that can cause fever, rash, and pain)
  • Kidney problems or kidney failure
  • Lupus symptoms
  • Seizures
  • Rhabdomyolysis
  • Inflammation of the pancreas
  • Uveitis (inflammation of part of the eye that can cause vision problems and redness)
  • Myocarditis (inflammation of the heart muscle)
  • Antibiotic-associated diarrhea

Report Side Effects

Bactrim may cause other side effects. Call your healthcare provider if you have any unusual problems while taking this medication.

If you experience a serious side effect, you or your healthcare provider may send a report to the FDA's MedWatch Adverse Event Reporting Program or by phone (800-332-1088).

Dosage: How Much Bactrim Should I Take?

Drug Content Provided and Reviewed by IBM Micromedex®

The dose of this medicine will be different for different patients. Follow your doctor's orders or the directions on the label. The following information includes only the average doses of this medicine. If your dose is different, do not change it unless your doctor tells you to do so.

The amount of medicine that you take depends on the strength of the medicine. Also, the number of doses you take each day, the time allowed between doses, and the length of time you take the medicine depend on the medical problem for which you are using the medicine.

  • For oral dosage forms (liquid or tablets):
    • For treatment of bacterial infections:
      • Adults—1 tablet (DS tablet) of 800 milligrams (mg) of sulfamethoxazole and 160 mg of trimethoprim, 2 tablets of 400 mg of sulfamethoxazole and 80 mg of trimethoprim, or 4 teaspoonfuls or 20 milliliters (mL) of oral liquid every 12 hours for 10 to 14 days. Your doctor may adjust this dose if needed.
      • Children 2 months of age and older—Dose is based on body weight and must be determined by your doctor. The usual dose is 40 milligrams (mg) per kilogram of body weight of sulfamethoxazole and 8 milligrams (mg) per kilogram of body weight of trimethoprim, given in two divided doses every 12 hours for 10 days.
        • Weighing 40 kilograms (kg)—4 teaspoonfuls (20 mL) of oral liquid or 2 tablets (or 1 DS tablet) 2 times a day for 10 days.
        • Weighing 30 kg—3 teaspoonfuls (15 mL) of oral liquid or 1 ½ tablet 2 times a day for 10 days.
        • Weighing 20 kg—2 teaspoonfuls (10 mL) of oral liquid or 1 tablet 2 times a day for 10 days.
        • Weighing 10 kg—1 teaspoonful (5 mL) of oral liquid 2 times a day for 10 days.
      • Children younger than 2 months of age—Use is not recommended.
    • For treatment of bronchitis:
      • Adults—1 tablet (DS tablet) of 800 milligrams (mg) of sulfamethoxazole and 160 mg of trimethoprim, 2 tablets of 400 mg of sulfamethoxazole and 80 mg of trimethoprim, or 4 teaspoonfuls or 20 milliliters (mL) of oral liquid every 12 hours for 14 days.
      • Children 2 months of age and older—Use and dose must be determined by your doctor.
      • Children younger than 2 months of age—Use is not recommended.
    • For treatment of Pneumocystis jiroveci pneumonia or Pneumocystis carinii pneumonia (PCP):
      • Adults and children 2 months of age and older—Dose is based on body weight and must be determined by your doctor. The usual dose is 75 to 100 milligrams (mg) per kilogram of body weight of sulfamethoxazole and 15 to 20 milligrams (mg) per kilogram of body weight of trimethoprim each day, given in equally divided doses every 6 hours for 14 to 21 days.
        • Weighing 80 kilograms (kg)—10 teaspoonfuls (50 milliliters (mL)) or 5 tablets (or 2 ½ DS tablets) 4 times a day for 14 to 21 days.
        • Weighing 64 kg—8 teaspoonfuls (40 mL) or 4 tablets (or 2 DS tablets) 4 times a day for 14 to 21 days.
        • Weighing 48 kg—6 teaspoonfuls (30 mL) or 3 tablets (or 1 ½ DS tablets) 4 times a day for 14 to 21 days.
        • Weighing 40 kg—5 teaspoonfuls (25 mL) or 2 ½ tablets 4 times a day for 14 to 21 days.
        • Weighing 32 kg—4 teaspoonfuls (20 mL) or 2 tablets (or 1 DS tablet) 4 times a day for 14 to 21 days.
        • Weighing 24 kg—3 teaspoonfuls (15 mL) or 1 ½ tablets 4 times a day for 14 to 21 days.
        • Weighing 16 kg—2 teaspoonfuls (10 mL) or 1 tablet 4 times a day for 14 to 21 days.
        • Weighing 8 kg—1 teaspoonful (5 mL) 4 times a day for 14 to 21 days.
      • Children younger than 2 months of age—Use is not recommended.
    • For prevention of Pneumocystis jiroveci pneumonia or Pneumocystis carinii pneumonia (PCP):
      • Adults—800 milligrams (mg) of sulfamethoxazole and 160 mg of trimethoprim once a day.
      • Children 2 months of age and older—Dose is based on body size and must be determined by your doctor. The usual dose is 750 mg of sulfamethoxazole and 150 mg of trimethoprim per square meter (m[2]) of body surface each day. This is given in equally divided doses two times a day for 3 days a week on consecutive days (eg, Monday, Tuesday, Wednesday). However, the dose is usually not more than 1600 mg of sulfamethoxazole and 320 mg of trimethoprim per day.
      • Children younger than 2 months of age—Use is not recommended.
    • For treatment of traveler's diarrhea:
      • Adults—1 tablet (DS tablet) of 800 milligrams (mg) of sulfamethoxazole and 160 mg of trimethoprim, 2 tablets of 400 mg of sulfamethoxazole and 80 mg of trimethoprim, or 4 teaspoonfuls or 20 milliliters (mL) of oral liquid every 12 hours for 5 days.
      • Children 2 months of age and older—Use and dose must be determined by your doctor.
      • Children younger than 2 months of age—Use is not recommended.

Modifications

You may need to use caution when taking Bactrim if you are 65 years or older, especially if you have other conditions such as kidney or liver problems, folate deficiency, or take certain medications, such as diuretics or digoxin. Older adults are more likely to react negatively to Bactrim.

People with liver or kidney problems may need a lower dose of Bactrim, or may not be able to take Bactrim, depending on the severity of the condition.

People who are pregnant, planning to become pregnant, or are breastfeeding should consult their healthcare provider for medical advice.

Missed Dose

If you miss a dose of Bactrim, take it as soon as possible. If it is almost time for the next dose, skip the missed dose. Do not take two doses together.

Overdose: What Happens If I Take Too Much Bactrim?

Taking too much Bactrim can cause symptoms such as:

  • Appetite loss
  • Nausea or vomiting
  • Dizziness
  • Headache
  • Fever
  • Drowsiness
  • Confusion
  • Unconsciousness

Taking too much Bactrim for an extended period may cause blood cell disorders.

What Happens If I Overdose on Bactrim?

If you think you or someone else may have overdosed on Bactrim, call a healthcare provider or the Poison Control Center (800-222-1222).

If someone collapses or isn't breathing after taking Bactrim, call 911 immediately.

Precautions

Drug Content Provided and Reviewed by IBM Micromedex®

It is very important that your doctor check the progress of you or your child at regular visits to make sure that this medicine is working properly. Blood and urine tests may be needed to check for unwanted effects.

Using this medicine while you are pregnant can harm your unborn baby. Use an effective form of birth control to keep from getting pregnant. If you think you have become pregnant while using the medicine, tell your doctor right away.

This medicine may cause serious skin reactions, including Stevens-Johnson syndrome, toxic epidermal necrolysis, drug reaction with eosinophilia and systemic symptoms (DRESS), acute generalized exanthematous pustulosis (AGEP), or acute febrile neutrophilic dermatosis (AFND). Check with your doctor if you have a skin rash, blistering, peeling, loosening of the skin, chills, cough, diarrhea, itching, joint or muscle pain, red irritated eyes, red skin lesions, often with a purple center, sore throat, sores, ulcers, white spots in the mouth or on the lips, black, tarry stools, chest pain, or painful or difficult urination.

Check with your doctor right away if you have dark urine, clay-colored stools, stomach pain, or yellow eyes or skin. These may be symptoms of a serious liver problem.

This medicine, especially if you are receiving high doses or for a long period of time, may lower the number of platelets in your body, which are necessary for proper blood clotting. Because of this, you may bleed or get infections more easily. Talk with your doctor if you have black, tarry stools, bleeding gums, blood in urine or stools, pinpoint red spots on the skin, unusual bleeding or bruising.

This medicine may cause diarrhea, and in some cases it can be severe. It may occur 2 months or more after you stop taking this medicine. Do not take any medicine to treat diarrhea without first checking with your doctor. If you have any questions or if mild diarrhea continues or gets worse, check with your doctor.

Check with your doctor right away if you or your child have stomach cramps, bloating, watery and severe diarrhea, which may also be bloody, nausea or vomiting, or unusual tiredness or weakness. These may be symptoms of a serious intestinal infection.

This medicine may cause serious allergic reactions, including anaphylaxis, which can be life-threatening and require immediate medical attention. Check with your doctor right away if you or your child have a rash, itching, swelling of the face, tongue, and throat, trouble breathing, or chest pain after you use the medicine.

This medicine may cause electrolyte problems, including high potassium in the blood (hyperkalemia) and low sodium in the blood (hyponatremia). Tell your doctor right away if you have confusion, weakness, muscle twitching, an irregular heartbeat, numbness or tingling in the hands, feet, or lips, or trouble breathing.

This medicine may cause hypoglycemia (low blood sugar) in some patients. Check with your doctor if you have anxiety, behavior change similar to being drunk, blurred vision, cold sweats, confusion, cool pale skin, difficulty with concentrating, drowsiness, excessive hunger, headache, nausea, nervousness, rapid heartbeat, shakiness, or unusual tiredness or weakness.

Before you have any medical tests, tell the medical doctor in charge that you or your child are taking this medicine. The results of some tests may be affected by this medicine.

Patients receiving anticonvulsant treatment (medicines to prevent seizures) may be at risk for a folate (vitamin B9) deficiency, which may increase the risk for side effects. Talk with your doctor if you have concerns about this.

Do not use this medicine if you are also using dofetilide (Tikosyn®).

Do not use this medicine for Pneumocystis jiroveci pneumonia (PCP) if you are also using leucovorin. Using these medicines together may cause these medicines to not work as well for you.

Do not take other medicines unless they have been discussed with your doctor. This includes leucovorin, other prescription or nonprescription (over-the-counter [OTC]) medicines and herbal or vitamin supplements.

What Are Reasons I Shouldn't Take Bactrim?

Bactrim is not appropriate for everyone. You should not take this medication if you are allergic to sulfamethoxazole (or any sulfa drugs), trimethoprim, or any of the inactive ingredients in Bactrim. 

Bactrim should not be used in infants under 2 months old, as well as people with:

  • A history of low platelet levels caused by Bactrim or sulfa drugs
  • A breastfeeding infant with G6PD deficiency (a condition that causes the breakdown of red blood cells)
  • Significant liver problems
  • Megaloblastic anemia (a condition where the bone marrow produces abnormal, large red blood cells)
  • Folate deficiency
  • G6PD deficiency
  • Thyroid problems
  • Porphyria (a group of disorders that affects the skin and nervous system)

Bactrim may be prescribed with caution in some people, only if the healthcare provider determines it is safe. This includes adults 65 years or older, people who drink alcohol regularly, and those with:

  • High potassium levels
  • Mild or moderate kidney or liver problems
  • Bronchial asthma
  • Malnourishment
  • Malabsorption (difficulty in absorbing nutrients)
  • Severe allergies
  • Lupus
  • Phenylketonuria (PKU, a rare inherited disorder that can cause mental, behavioral, and intellectual problems as well as seizures)
  • Recent antibiotic-associated diarrhea

What Other Medications May Interact With Bactrim?

Tell your healthcare provider about all of the medicines you take, including prescription and over-the-counter (OTC) drugs, and vitamins or supplements. Bactrim interacts with various other drugs, such as:

The above drugs interact with Bactrim in different ways. Some drugs should never be taken with Bactrim, such as amantadine, methotrexate, indomethacin, or dofetilide. Others will require a dosage adjustment or other special considerations. Ask your healthcare provider if you are unsure whether you can take a certain medication with Bactrim.

Bactrim also interacts with certain oral drugs used for type 2 diabetes. It may increase the strength of these medications, which can drastically reduce blood sugar levels, requiring more frequent monitoring. These medications include:

Other interactions may occur with Bactrim. Consult your healthcare provider for a complete list of drug and supplement interactions.

What Medications Are Similar?

Bactrim is a sulfa, or sulfonamide, antibiotic. Bactrim and Bactrim DS (double strength) are oral sulfa antibiotics. There are also a variety of topical medications used on the skin that contain sulfa ingredients, such as sodium sulfacetamide and sodium sulfacetamide/sulfur combination products.

Other oral antibiotics include:

There are also OTC topical antibiotics, such as Neosporin (known as a triple antibiotic ointment) or bacitracin. 

The antibiotic prescribed by your healthcare provider is the one expected to be the most effective against the bacteria causing the infection. Antibiotics such as Bactrim do not work against viral infections such as the cold, flu, or COVID-19.

If you are allergic to Bactrim, you'll want to know of other medications that are not antibiotics but may contain ingredients that you may also be allergic to:

Consult your healthcare provider for more information regarding allergies and appropriate medications for you.

Frequently Asked Questions

  • What is Bactrim used for?

    Bactrim treats various bacterial infections, such as UTIs, middle ear infections, and acute exacerbations (sudden worsening) of chronic bronchitis. It is not useful for treating viral infections such as the flu, colds, or COVID-19. Your healthcare provider will prescribe Bactrim if they determine it to be the most effective antibiotic choice for the bacteria causing your infection.

  • How does Bactrim work?

    Bactrim has a wide spectrum of antimicrobial activity. It works by stopping the growth of bacteria causing the infection.

  • What drugs should not be taken with Bactrim?

    Bactrim interacts with a variety of medications. Some drugs should not be taken at all with Bactrim, while others may require a dosage adjustment. Before taking Bactrim, tell your healthcare provider about all of the medications you take, including prescription and OTC drugs, vitamins, and supplements.

  • How long does it take for Bactrim to work?

    Bactrim can start working quickly. You may even start to feel better within a day or two of starting it. However, it is important to take Bactrim for the full length of time prescribed to make sure that the infection is clear and to prevent antibiotic resistance.

  • What are the side effects of Bactrim?

    The most common side effects of Bactrim are nausea, vomiting, appetite loss, and skin rash. Other, serious side effects can occur. Before taking Bactrim, talk to your healthcare provider about what side effects to expect and what to do if you experience them.

  • How do I stop taking Bactrim?

    Your healthcare provider will tell you how long to take Bactrim. Do not stop taking it until your course of treatment is complete unless your provider tells you to do so.

How Can I Stay Healthy While Taking Bactrim?

Before taking Bactrim, discuss all medical conditions and medical history with your healthcare provider. Tell them about any allergies to medications and your current use of prescription and OTC drugs, vitamins, and herbal supplements. Bactrim interacts with various drugs, so providing your provider with accurate information helps ensure that Bactrim will be prescribed safely.

Bactrim is an antibiotic; it must be taken for the full length of time prescribed. If you stop taking it too soon, the infection could come back or you may become resistant to the medicine. This means that the next time you need it, it might not work as well. 

Ask your healthcare provider or pharmacist what types of non-medicinal measures you can take to help relieve your symptoms in addition to taking an antibiotic. For example, drinking plenty of fluids, using a vaporizer or humidifier, and taking cough drops as needed can help the symptoms of an infection, while Bactrim fights the bacteria that causes the infection. Drinking plenty of fluids also helps prevent kidney stones while you take Bactrim.

Bactrim can cause you to burn in the sun more easily. For this reason, when taking Bactrim, avoid sunlight and tanning beds. Wear protective clothing and sunscreen when you are outside, and remember to reapply sunscreen regularly. 

Medical Disclaimer

Verywell Health's drug information is meant for educational purposes only and is not intended to replace medical advice, diagnosis, or treatment from a healthcare provider. Consult your healthcare provider before taking any new medication(s). IBM Watson Micromedex provides some of the drug content, as indicated on the page.

6 Sources
Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. DailyMed. Label: Bactrim DS- sulfamethoxazole and trimethoprim tablet; Bactrim- sulfamethoxazole and trimethoprim tablet.

  2. Epocrates. Sulfamethoxazole/trimethoprim.

  3. Barbut F, Meynard JL. Managing antibiotic associated diarrhoea. BMJ. 2002;324(7350):1345-1346. doi: 10.1136/bmj.324.7350.1345

  4. Prescribers' Digital Reference. Sulfamethoxazole/trimethoprim - drug summary.

  5. Epocrates. Sulfamethoxazole/trimethoprim.

  6. U.S. National Library of Medicine. DailyMed. Label: Bactrim DS- sulfamethoxazole and trimethoprim tablet; Bactrim- sulfamethoxazole and trimethoprim tablet.

By Karen Berger, PharmD
Karen Berger, PharmD, is a community pharmacist and medical writer/reviewer.