Bactrim is an antibiotic drug that doctors use to treat or prevent certain bacterial infections in adults and children.
Bactrim is a brand-name medication that also comes in a generic form called sulfamethoxazole/trimethoprim. Bactrim comes as an oral tablet in two different forms: regular strength and double strength (Bactrim DS). It is a prescription medication and is not available over-the-counter (OTC).
Need a diagnosis or prescription quickly? Optum Perks offers personalized on-demand care in as little as 15 minutes. For $29, answer a few questions online and receive a diagnosis and treatment plan from a US-licensed healthcare professional. Get started here.
What is Bactrim used to treat?
The Food and Drug Administration (FDA) has approved both Bactrim and Bactrim DS to treat conditions caused by certain bacteria in adults and children. Bactrim may be prescribed to treat:
- UTI caused by certain bacteria in adults and in children ages 2 months and older
- short-term middle ear infection caused by certain bacteria in children ages 2 months and older
- sudden worsening of chronic bronchitis caused by certain bacteria in adults
- traveler’s diarrhea in adults
- a type of dysentery infection called shigellosis in adults and in children ages 2 months and older
- a type of lung infection called pneumocystis pneumonia in adults and in children ages 2 months and older
Bactrim may also be used off-label for other conditions, like some sexually transmitted infections (STIs). With off-label use, doctors prescribe a drug for a purpose other than what it’s approved for.
What bacteria does Bactrim cover?
Bactrim belongs to a group of drugs called sulfonamide antibiotics. These antibiotics kill bacteria and fungi by blocking them from making folic acid, which they need to grow and survive. Some of the bacteria and microorganisms Bactrim works against are:
- Streptococcus pneumoniae: may cause pneumonia, meningitis, bloodstream infection, ear infection, and sinus infection
- Escherichia coli (E. coli): may cause traveller’s diarrhea and other types of diarrhea
- Klebsiella species: may cause pneumonia, bloodstream infections, wound or surgical site infections, and meningitis
- Enterobacter species: may cause pneumonia, lung abscess, UTI, prostate gland infection, bacterial infection of the skin and bone infection
- Haemophilus influenzae: may cause pneumonia, bloodstream infection, meningitis, swelling of the throat, skin infection, infectious arthritis (swelling of the joint), ear infection, and bronchitis
- Proteus mirabilis, Proteus vulgaris: may cause UTIs, kidney stones, and wound infections
- Shigella flexneri, Shigella sonnei: may cause a type of dysentery infection called shigellosis
- Pneumocystis jirovecii: may cause pneumocystis pneumonia
Sometimes, your doctor may order tests to check the cause of infection before prescribing Bactrim.
How quickly will Bactrim work?
Bactrim starts working within a few hours of taking it. But it may take a few days before you notice symptoms of your condition clearing up.
It’s important to continue taking Bactrim for the entire length of time your doctor has prescribed it. This ensures that your infection does not come back. It’s also important to know that even though Bactrim DS tablets contain twice as much medication as Bactrim tablets, they don’t work any faster.

Free prescription coupons
Seriously … free. Explore prices that beat the competition 70% of the time.
Get free cardThe dosage of Bactrim commonly prescribed for the conditions it treats is as follows:
- UTI
- For adults: Two Bactrim tablets or one Bactrim DS tablet taken every 12 hours for 10 to 14 days.
- For children ages 2 months and older: 40 milligrams (mg) of sulfamethoxazole per kilogram (kg) of body weight and 8 mg/kg of trimethoprim per day, divided into two doses per day (one dose taken every 12 hours) for 10 days.
- Ear infection: Children ages 2 months and older should take 40 mg/kg of sulfamethoxazole and 8 mg/kg of trimethoprim per day. This will be divided into two daily doses (one dose taken every 12 hours) for 10 days.
- Bronchitis: Adults should take two Bactrim tablets or one Bactrim DS tablet every 12 hours for 14 days.
- Traveler’s diarrhea: Adults should take two Bactrim tablets or one Bactrim DS tablet taken every 12 hours for 5 days.
- Shigellosis:
- For adults: Two Bactrim tablets or one Bactrim DS tablet taken every 12 hours for 5 days.
- For children ages 2 months and older: 40 mg/kg of sulfamethoxazole and 8 mg/kg of trimethoprim per day. This will be divided into two doses per day (one dose taken every 12 hours) for 5 days.
- Pneumocystis pneumonia: Your doctor will calculate the dose you need to treat pneumocystis pneumonia. The dosage for adults and children is based on body weight. Doctors usually recommend 75 to 100 mg/kg of sulfamethoxazole and 15 to 20 mg/kg of trimethoprim. This will be divided into four doses per day (one dose taken every 6 hours) for 14 to 21 days. To prevent pneumocystis pneumonia in adults, the recommended dose is one tablet of Bactrim DS taken once per day.
Download the free Optum Perks Discount Card to save up to 80% on many prescription medications. Plus, you can now get them delivered to your home in as little as 3 days. Search for your medication here.
Summary
Bactrim is an antibiotic drug that doctors commonly use to treat conditions like UTI, ear infection, traveler’s diarrhea, shigellosis, pneumonia, and bronchitis. It works by killing a wide range of bacteria, such as streptococcus pneumoniae and E. coli.
Bactrim works as soon as you start taking it, but you may not notice your condition getting better in a few days. It’s important to take Bactrim exactly as your doctor prescribes and to keep taking it for the entire length of your treatment. This ensures that your infection doesn’t return.