Key takeaways:
Bactrim (sulfamethoxazole/trimethoprim) is a sulfa antibiotic used to treat many common bacterial infections. For a urinary tract infection, you’ll typically take Bactrim twice daily for 3 to 14 days. Most people start feeling better within a few days.
Common Bactrim side effects include stomach upset, rash, and diarrhea. Sun sensitivity is also possible. Knowing what side effects to look for and how to manage them will help keep you safe while taking Bactrim.
Bactrim is available as a lower-cost generic. GoodRx can help you save over 70% off the average retail price at certain pharmacies.
Save on related medications
Urinary tract infections (UTIs) are common. In fact, they’re the second most common type of infection that people get. Anyone can get one. But you're more likely to get a UTI if you have female anatomy — and they often happen around puberty, after sex, and after menopause. Later in life, everyone’s risk for UTIs goes up.
If you’re experiencing any of the common UTI symptoms — most notably, pain when you pee — and your healthcare provider thinks a bacterial infection is at fault, they’ll likely recommend taking an antibiotic. Bactrim (sulfamethoxazole/trimethoprim) is one antibiotic they may prescribe.
Here, we’ll talk about how soon Bactrim starts working and offer tips on how to take it, so you can start feeling better.
Search and compare options
What is Bactrim, and can it treat UTIs?
Bactrim is a sulfa antibiotic that contains two medications: sulfamethoxazole and trimethoprim. These medications kill bacteria by blocking them from making folic acid, a chemical needed for the bacteria to grow.
Bactrim is approved and recommended to treat UTIs. But it’s also approved for ear infections, bronchitis, and other conditions. It’s most often dispensed as a generic product, but in addition to the brand name Bactrim, it’s also sold under the brand names Septra, Septra DS, and Sulfatrim Pediatric.
Bactrim comes in an intravenous (IV) solution and in the following oral formulations and dosages:
Bactrim SS (single strength) tablets: 400 mg sulfamethoxazole and 80 mg trimethoprim
Bactrim DS (double strength) tablets: 800 mg sulfamethoxazole and 160 mg trimethoprim
Bactrim liquid suspension: 200 mg sulfamethoxazole and 40 mg trimethoprim (per 5 mL dose)
Keep in mind: Some UTIs are resistant to Bactrim. This means Bactrim won’t effectively treat them. In fact, some research has found that Bactrim didn’t work for roughly 1 in 4 UTIs caused by E. coli (the most common bacterial cause of UTIs). But Bactrim remains a highly effective UTI treatment if you live in an area where Bactrim resistance is low. Your provider will be in charge of tracking this.
5 pharmacist-backed tips for taking Bactrim
Before starting Bactrim, make sure your pharmacist and healthcare provider know about any drug allergies you have and other medications you take. There are some safety concerns about taking Bactrim during pregnancy, so tell your provider if you are (or might be) pregnant. They can prescribe a pregnancy-safe antibiotic, such as penicillin or cephalosporin.
Below, we’ll answer the most common questions pharmacists get about taking Bactrim for UTIs.
1. How fast does Bactrim work for UTIs?
Bactrim starts killing bacteria that cause UTIs within hours of your first dose. Most people start feeling better within a few days.
For a mild UTI, you may only need to take Bactrim for as little as 3 days to get rid of the infection. UTIs with fever, however, are more serious. This combination of symptoms may suggest a more severe bladder or kidney infection. In this case, you’ll need to take Bactrim longer to clear up the infection — often up to 14 days (2 weeks).
If your UTI is causing pain, a few days can feel like a long time. While you’re waiting for Bactrim to get rid of the infection, you may want to consider an over-the-counter product to ease the discomfort in the short term. Phenazopyridine (Azo, Pyridium) is an oral tablet you take by mouth. It helps with UTI pain by numbing your urinary tract. General pain relievers, like acetaminophen (Tylenol), can help too.
Always finish taking your prescription, even if you’re feeling better before all the doses are gone. This will help prevent your infection from coming back and lower the chance of resistance. If your UTI symptoms don’t get better or you develop new symptoms — such as fever, pain in your side, or vomiting — contact your healthcare provider right away.
Good to know: Bactrim DS tablets contain twice as much medication as Bactrim SS tablets. But they don’t work any faster. It’s important to take the specific dose prescribed for you.
2. When is the best time to take Bactrim?
For UTIs, Bactrim is usually taken twice daily. As long as your doses are spaced about 12 hours apart, it’s OK to take them at whatever times work well with your personal schedule. There’s no strict guidance for avoiding morning, afternoon, or evening doses.
On your first day of taking Bactrim, your healthcare provider may recommend spacing doses slightly closer together so that you can get your first two doses in on that day. Follow your provider’s directions and the ones on the Bactrim label. If you’re unsure about anything, ask your pharmacist to clarify.
3. Should you take Bactrim with food?
It’s OK to take Bactrim with or without food. But make sure to take it with a full glass of water. Staying well hydrated will help prevent kidney problems. It may help prevent future UTIs, too.
Some people experience stomach upset when they take Bactrim on an empty stomach. If this happens to you, taking your Bactrim with food or milk can help.
4. What happens if you miss a dose of Bactrim?
Missed doses sometimes happen. It’s easy to forget to take your medication, especially when you’re new to it.
Take your missed dose as soon as you remember. But if it’s already almost time for your next dose, skip taking the missed dose that day. If this happens, it might take an extra day to finish your Bactrim prescription. That’s OK; keep taking your doses until they run out. But never make up for a missed dose by taking two doses at once.
5. How can you manage Bactrim side effects?
Many people taking Bactrim for a short time experience no side effects. Others experience mild, temporary ones. The most common Bactrim side effects include stomach upset, rash, and diarrhea. But more serious effects are also possible.
Knowing what to look for and how to manage side effects can help keep you safe while you’re taking Bactrim.
Stomach upset or diarrhea
If you develop an upset stomach, try taking your doses with food or milk. If you’re still having trouble, tell your healthcare provider.
Many antibiotics, including Bactrim, can cause diarrhea. Rarely, a severe form of diarrhea caused by a Clostridioides difficile (C. difficile or C. diff) infection can occur up to 3 months after starting an antibiotic. The good news is this risk is lower with Bactrim than with many other commonly used antibiotics.
Notify your healthcare provider if you develop watery diarrhea or severe stomach cramping while you’re taking Bactrim or in the 3 months afterward. These are possible signs of a C. diff infection.
Sun sensitivity
Many medications can make your skin more sensitive to sun exposure. And Bactrim is one of them. Your skin might burn more easily while you’re taking this antibiotic. Or you might develop a rash. To be safe, take extra sun precautions while you’re taking Bactrim: cover up, seek shade, and regularly apply sunscreen (SPF 30 or higher).
Allergic rash
Up to 8% of people are allergic to sulfa medications like Bactrim. A slightly bumpy skin rash is the most common sign of an allergic reaction. If this happens, it usually shows up soon after starting Bactrim. Anaphylaxis is a life-threatening allergic reaction that’s also possible early on, but this is very rare.
Tell your healthcare provider right away if you develop a rash while taking Bactrim. They can look at it and decide if it’s anything to worry about. But if you’re experiencing signs of a severe reaction — trouble breathing, widespread rash, or facial swelling — call 911 or seek immediate medical care.
Reaction with alcohol
Bactrim can make it harder for your body to clear alcohol from your system. If you drink alcohol while taking Bactrim, you may have unwanted side effects, including fast heartbeat, flushing, and nausea or vomiting.
To be safe, try to avoid drinking alcohol while taking Bactrim.
How to save money on Bactrim
There are many ways to save on Bactrim, which is available as both a brand-name and generic medication. GoodRx can help you save over 70% off the average retail price of the generic version. Generic Bactrim’s price at certain pharmacies is as low as $2.10 with a free GoodRx discount.
The bottom line
Bactrim starts killing UTI-causing bacteria soon after your first dose. Most people feel better within a few days, but make sure to finish all your prescribed Bactrim doses. Take your doses with food if Bactrim bothers your stomach.
To be safe, avoid drinking alcohol and protect your skin from the sun while taking Bactrim. Tell your healthcare provider if you develop a rash or severe diarrhea after starting the medication, even if you have already finished your prescription.
Why trust our experts?



References
ANI Pharmaceuticals. (2023). Sulfamethoxazole and trimethoprim [package insert].
Giles, A., et al. (2019). Sulfonamide allergies. Pharmacy.
Gupta, K., et al. (2011). International clinical practice guidelines for the treatment of acute uncomplicated cystitis and pyelonephritis in women: A 2010 update by the Infectious Diseases Society of America and the European Society for Microbiology and Infectious Diseases. Clinical Infectious Diseases.
Hensgens, M. P. M., et al. (2012). Time interval of increased risk for Clostridium difficile infection after exposure to antibiotics. The Journal of Antimicrobial Chemotherapy.
Sanchez, G. V., et al. (2016). Antibiotic resistance among urinary isolates from female outpatients in the United States in 2003 and 2012. Antimicrobial Agents and Chemotherapy.
Sun Pharmaceuticals Industries. (2021). Bactrim [package insert].
Urology Care Foundation. (n.d.). Understanding UTIs across the lifespan.










