Sulfamethoxazole/trimethoprim (sometimes known as SMZ/TMP) is a combination medication containing an antifolate and sulfa antibiotic. It's used to treat different types of infections, such as urinary tract infections (UTIs), ear infections, and lung infections. This antibiotic has two different brand names, Bactrim and Septra, and it's also available as a lower-cost generic. It's a tablet that's taken by mouth, typically twice daily for most types of infections. This antibiotic also comes as a suspension under the brand name Sulfatrim for people who can't swallow tablets and as an injection for people in the hospital. Common side effects include nausea, diarrhea, and rash.
Lower respiratory tract infection (e.g., Pneumocystis pneumonia, infections related to bronchitis)
Travelers' diarrhea - tablet or liquid only
Ear infections - tablet or liquid only
Sulfamethoxazole/trimethoprim is a combination of two antibiotics, sulfamethoxazole (a sulfonamide) and trimethoprim (antifolate). They work together to stop bacteria from being able to make folic acid, a nutrient that's important for bacterial growth and survival. By stopping bacteria from making folic acid, sulfamethoxazole/trimethoprim kills the bacteria.
Source: DailyMed
Along with its needed effects, a medicine may cause some unwanted effects. Although not all of these side effects may occur, if they do occur they may need medical attention.
Check with your doctor immediately if any of the following side effects occur:
More common
Black, tarry stools
blistering, peeling, or loosening of the skin
changes in skin color
chest pain or tightness
chills
cough or hoarseness
dark urine
dizziness
general feeling of tiredness or weakness
headache
itching, skin rash
joint or muscle pain
light-colored stools
loss of appetite
lower back or side pain
pain, tenderness, or swelling of the foot or leg
painful or difficult urination
pale skin
red skin lesions, often with a purple center
red, irritated eyes
sores, ulcers, or white spots in the mouth or on the lips
stomach pain
swollen or painful glands
trouble breathing
unpleasant breath odor
unusual bleeding or bruising
vomiting of blood
yellow eyes or skin
Incidence not known
Back, leg, or stomach pains
bleeding gums
blindness or vision changes
blood in the urine or stools
bluish-colored lips, fingernails, or palms
burning, crawling, itching, numbness, painful, prickling, "pins and needles", or tingling feelings
burning of the face or mouth
cloudy urine
confusion
continuing ringing or buzzing or other unexplained noise in the ears
cracks in the skin
decreased frequency or amount of urine
difficulty with swallowing
fainting spells
general body swelling
general feeling of discomfort or illness
hearing loss
increased thirst
indigestion
irregular heartbeat
large, flat, blue, or purplish patches in the skin
large, hive-like swelling on the face, eyelids, lips, tongue, throat, hands, legs, feet, or sex organs
loss of heat from the body
muscle or joint pain
nosebleeds
not able to pass urine
numbness or tingling in the hands, feet, or lips
pain or burning while urinating
pinpoint red spots on the skin
puffiness or swelling of the eyelids or around the eyes, face, lips, or tongue
raised red swellings on the skin, the buttocks, legs, or ankles
redness of the white part of the eyes
redness, swelling, or soreness of the tongue
seizures
soreness of the muscles
stiff neck or back
stomach tenderness
swelling of the face, hands, legs, and feet
unsteadiness, trembling, or other problems with muscle control or coordination
weakness in the hands or feet
weakness or heaviness of the legs
weight gain or loss
Some side effects may occur that usually do not need medical attention. These side effects may go away during treatment as your body adjusts to the medicine. Also, your health care professional may be able to tell you about ways to prevent or reduce some of these side effects. Check with your health care professional if any of the following side effects continue or are bothersome or if you have any questions about them:
More common
Passing of gas
Incidence not known
Discouragement
feeling of constant movement of self or surroundings
feeling sad or empty
increased sensitivity of the skin to sunlight
lack of feeling or emotion
loss of interest or pleasure
nervousness
redness or other discoloration of the skin
seeing, hearing, or feeling things that are not there
sensation of spinning
severe sunburn
trouble concentrating
trouble sleeping
uncaring
Other side effects not listed may also occur in some patients. If you notice any other effects, check with your healthcare professional.
Call your doctor for medical advice about side effects. You may report side effects to the FDA at 1-800-FDA-1088.
Treats many types of bacterial infections
Can be given to children as young as 2 months old to treat certain infections
Available as a lower-cost generic
Can upset your stomach and make your skin more sensitive to the sun
Not the best choice for people with liver or kidney problems
Not recommended if you're pregnant
Can't take if you have a sulfa allergy
Take sulfamethoxazole/trimethoprim exactly as prescribed. Make sure to finish your antibiotic treatment, even if you're feeling better. Stopping the antibiotic earlier than prescribed can make your infection come back and become harder to treat.
You can take sulfamethoxazole/trimethoprim with or without food. Taking it with food might help lessen nausea and stomach upset from the medication.
Make sure to drink enough fluids while you're taking sulfamethoxazole/trimethoprim. Staying hydrated can help lower your risk for possible kidney problems with this antibiotic.
Get medical help right away if you have watery or bloody diarrhea, fever, fatigue, or stomach cramps at any time during treatment or after stopping sulfamethoxazole/trimethoprim. These could be signs of a type of infectious diarrhea called Clostridiodes difficile (C. diff)-related diarrhea, which should be treated as soon as possible.
Ask a healthcare professional (HCP) whether it's safe and appropriate for you to take a probiotic with sulfamethoxazole/trimethoprim. Probiotics might help lessen the risk of a rare, but serious C. diff infection that's possible with antibiotic treatment. Separate the probiotic from sulfamethoxazole/trimethoprim by at least 2 hours to prevent the antibiotic from killing the "good" bacteria in the probiotic.
Be sure to tell your prescriber and pharmacist about all of the medications and supplements that you're taking. Sulfamethoxazole/trimethoprim interacts with many medications, such as warfarin (Coumadin), ACE inhibitors, ARBs, and leucovorin, among others. Your healthcare team can check for drug interactions and make sure all your medications are safe to take together.
Although rare, your blood sugar levels might drop while you're taking sulfamethoxazole/trimethoprim. This might be more likely if you have liver or kidney problems or poor nutrition. If you have diabetes and you're taking diabetes medications, ask your HCP whether you should check your blood sugar more often while you're taking this antibiotic.
Sulfamethoxazole/trimethoprim isn't recommended during pregnancy. This antibiotic can get in your body's way of processing folic acid, a nutrient that's important to a baby's development in the womb. Make sure to tell your healthcare team if you're pregnant; they'll most likely prescribe a different antibiotic for you.
In general, it's okay to breastfeed while you're taking sulfamethoxazole/trimethoprim if your baby is older than 2 months and born full-term. But it isn't recommended to nurse while you're taking this antibiotic if your baby was born premature, is sick, or has jaundice. To be safe, ask your healthcare team whether it's safe for you to breastfeed your baby while you're taking this antibiotic.
Sulfamethoxazole/trimethoprim can cause some serious health issues. This risk may be even higher for certain groups. If this worries you, talk to your doctor or pharmacist about other options.
Sulfamethoxazole/trimethoprim isn't recommended during pregnancy because there's a risk that the antibiotic can cause severe developmental harm to an unborn baby. Let your prescriber know if you're pregnant or thinking of becoming pregnant before starting this antibiotic. Also contact your prescriber right away if you find out that you're pregnant while you're taking sulfamethoxazole/trimethoprim. Your prescriber can discuss treatment options that are safer for you.
Risk factors: Allergy to sulfa
Severe allergic reactions to sulfamethoxazole/trimethoprim are possible, including life-threatening reactions, like facial swelling and anaphylaxis. Although rare, this antibiotic can also cause serious skin reactions, such as Stevens-Johnson syndrome (SJS) and drug reaction with eosinophilia and systemic symptoms (DRESS syndrome).
Let your prescriber know if you have an allergy to antibiotics or medications, especially any sulfa drugs, to make sure this antibiotic is safe for you. Stop taking sulfamethoxazole/trimethoprim and get medical attention right away if you notice any hives, rash, blisters, skin reddening, skin peeling, swelling of the lips or tongue, or trouble breathing.
Risk factors: Taking sulfamethoxazole/trimethoprim together with medications that raise your bleeding risk
Sulfamethoxazole/trimethoprim can lower your platelet count (thrombocytopenia). Having a low platelet count can put you at risk for serious bleeding. Your risk is higher if you're taking this antibiotic with other medications that also raise your bleeding risk, such as aspirin or warfarin (Coumadin). Typically, platelet counts go back to usual within a week after stopping the antibiotic.
Seek medical help right away if you have any unusual bleeding; bleeding that lasts for a long time; trouble stopping bleeds; easy bruising; or blood in your vomit, urine, or stool. Speak to a healthcare professional (HCP) if you have concerns.
Sulfamethoxazole/trimethoprim can raise your risk of getting infected with a bacteria called Clostridioides difficile (C. diff). Antibiotics change the amount of normal bacteria in your stomach and intestines. This can cause C. diff to overgrow in your gut and lead to an infection. C. diff infection can cause severe diarrhea.
It's important to recognize the difference between diarrhea as a side effect of sulfamethoxazole/trimethoprim and C. diff-related diarrhea. This type of infectious diarrhea can cause rapid heart rate, fever, nausea, foul-smelling diarrhea, and frequent bowel movements (even up to 15 times per day). It's a medical emergency, so get help right away if you have any symptoms of a C. diff infection. You'll need to get tested for C. diff infection and get treatment.
Risk factors: Taking high doses of sulfamethoxazole/trimethoprim | Kidney problems
Sulfamethoxazole/trimethoprim, especially at high dosages, can raise your potassium levels and lower your sodium levels. Contact an HCP right away if you experience weakness, tingling or numbness, headache, confusion, trouble concentrating, or memory problems.
Risk factors: Genetic condition called glucose-6 phosphate dehydrogenase (G6PD) deficiency | Older adult | Regularly drink alcohol | Kidney problems | Liver problems | Poor nutrition
Taking sulfamethoxazole/trimethoprim can lead to some blood-cell related problems in certain people. For example, people who have certain genetic conditions are at risk of having their red blood cells damaged and broken down when they take this antibiotic.
Taking sulfamethoxazole/trimethoprim can also sometimes make it more difficult for your body to absorb an important vitamin called folic acid. This can sometimes lead to low folic acid levels, which can affect how well your body can make blood cells. Low folic acid levels might be more likely if you're an older adult, if you regularly drink large amounts of alcohol, or if you have kidney or liver problems.
People with a rare genetic condition called phenylketonuria should be sure to follow a low-protein diet while they're taking sulfamethoxazole/trimethoprim. This genetic condition happens when the body has trouble processing a nutrient called phenylalanine. And sulfamethoxazole/trimethoprim can make it even harder for the body to break down this nutrient. Following a proper diet seems to help prevent you from having any noticeable PKU problems.
Urinary tract infections (UTI) or shigellosis
Adults: The typical dose is 800 mg/160 mg of sulfamethoxazole/trimethoprim by mouth every 12 hours. The antibiotic is taken for 10 to 14 days for UTI and 5 days for shigellosis.
Children age 2 months and older only: The prescriber will calculate the dose based on your child's body weight. The typical dose is 20 mg/kg of sulfamethoxazole and 4 mg/kg of trimethoprim by mouth every 12 hours. It's taken for 10 days for UTI and 5 days for shigellosis.
Ear infections
Children age 2 months and older: The prescriber will calculate the dose based on your child's body weight. The typical dose is 20 mg/kg of sulfamethoxazole and 4 mg/kg of trimethoprim by mouth every 12 hours for 10 days.
Infections related to bronchitis
Adults only: The typical dose is 800 mg/160 mg sulfamethoxazole/trimethoprim by mouth every 12 hours for 14 days.
Pneumocystis pneumonia
Prevention
Adults: The typical dose is 800 mg/160 mg of sulfamethoxazole/trimethoprim by mouth once per day.
Children age 2 months and older: The prescriber will calculate the dose based on your child's body weight and height. In general, the typical dose is 200 mg/40 mg or 400 mg/80 mg of sulfamethoxazole/trimethoprim by mouth every 12 hours.
Treatment
Adults and children age 2 months and older: The prescriber will calculate your dose based on your body weight. The typical dose is 75 mg/kg to 100 mg/kg of sulfamethoxazole and 15 mg/kg to 20 of mg/kg trimethoprim by mouth per day. The daily dose is divided into equal doses that are taken every 6 hours. Treatment typically lasts for 2 to 3 weeks.
Travelers' diarrhea
Adults only: The typical dose is 800 mg/160 mg sulfamethoxazole/trimethoprim by mouth every 12 hours for 5 days.
Your dose might differ if you have kidney problems.
Sulfamethoxazole/trimethoprim is also available as an injection that's infused through the veins by a healthcare professional (HCP) in a hospital setting.
GoodRx has partnered with PatientsLikeMe to provide reviews on the different aspects of Sulfamethoxazole/trimethoprim.
Learn more about the effectiveness of Sulfamethoxazole/trimethoprim based on real life experiences.
Based on 50 people taking this medication
3.6
3.1
4.3
3.0
2.9
4.6
Severity of side effects
Based on 164 people taking this medication
0%
50%
100%
Nausea
4%
Diarrhea
3%
Fever
2%
Stomach pain
2%
Alternating constipation and diarrhea
2%
Reasons people stopped taking Sulfamethoxazole/trimethoprim
Based on 256 people who have taken this medication
Course of treatment ended
58%
Doctor's advice
23%
Side effects too severe
11%
Did not seem to work
5%
Other
5%
Personal research
1%
How long people take Sulfamethoxazole/trimethoprim
Based on 275 people taking this medication
0%
50%
100%
Using this medicine with any of the following medicines is not recommended. Your doctor may decide not to treat you with this medication or change some of the other medicines you take.
Using this medicine with any of the following medicines is usually not recommended, but may be required in some cases. If both medicines are prescribed together, your doctor may change the dose or how often you use one or both of the medicines.
Using this medicine with any of the following medicines may cause an increased risk of certain side effects, but using both drugs may be the best treatment for you. If both medicines are prescribed together, your doctor may change the dose or how often you use one or both of the medicines.
Allergy to sulfa
History of having low platelet counts when treated with trimethoprim or other sulfa medications
Megaloblastic anemia due to low folic acid levels
Severe liver problems
Severe kidney problems
Children under 2 months of age
Take dofetilide (Tikosyn)
Lower respiratory tract infection (e.g., Pneumocystis pneumonia, infections related to bronchitis)
Travelers' diarrhea - tablet or liquid only
Ear infections - tablet or liquid only
Sudden worsening of chronic (long-term) bronchitis
Long-term prostate infections
By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.
Centers for Disease Control and Prevention. (2024). Pneumocystis pneumonia basics.
Drugs and Lactation Database (LactMed). (2021). Trimethoprim-sulfamethoxazole. National Institute of Child Health and Human Development.
Hariz, A., et al. (2023). Megaloblastic anemia. StatPearls.
Kemnic, T. R., et al. (2022). Trimethoprim sulfamethoxazole. StatPearls.
MedlinePlus. (2016). Phenylketonuria.
MedlinePlus. (2023). Folic acid - test.
Mohamed, N., et al. (2019). Clinically important and pharmacologically relevant drug interactions with alcohol. American Journal of Research in Medical Sciences.
Mylan Institutional. (2021). Sulfamethoxazole and trimethoprim injection [package insert]. DailyMed.
National Heart, Lung, and Blood Institute. (2022). Platelet disorders: Thrombocytopenia.
Shahzad, S., et al. (2020). Folic acid-sulfonamide conjugates as antibacterial agents: Design, synthesis and molecular docking studies. Royal Society of Chemistry Advances.
Sun Pharmaceutical Industries, Inc. (2024). Bactrim DS- sulfamethoxazole and trimethoprim tablet; Bactrim- sulfamethoxazole and trimethoprim tablet [package insert]. DailyMed.
Research prescriptions and over-the-counter medications from A to Z, compare drug prices, and start saving.