How Long Can You Take Keflex For?

In our latest question and answer, the pharmacist discusses if there is a maximum duration of use for the antibiotic Keflex.

3 min read Updated Jun 2026 Read by 2,221 people
How Long Can You Take Keflex For?
Share
Meadow asked

How many consecutive days can I take Keflex? I have been on it for 3 consecutive prescriptions.

Dec 11, 2022
The quick answer
  • There is no set maximum duration for taking Keflex, as how long you need it depends on what infection you're treating and how severe it is. Most infections are treated with Keflex for 7 to 14 days in a row. If your infection hasn't improved after multiple courses of Keflex, the bacteria may be resistant to it and your doctor should switch you to a different antibiotic.
A quick summary of Dr. Brian Staiger, PharmD's full answer below, condensed by AI from that answer only (not from any outside source). The pharmacist's answer is the source of record.

Answer

There is no set maximum duration you can take Keflex (cephalexin) for. How long you are treated with the drug depends on many factors, including what you are being treated for, and how severe your infection is.

Having said this, if you have taken multiple courses of the antibiotic in a row, you certainly have to consider the fact that the bacteria that is causing your infection may not be sensitive to it.

What Is Keflex Used For?

Keflex (cephalexin) is a first-generation 'cephalosporin' antibiotic, with activity against most gram-positive bacteria.

It is primarily used for the treatment of ear and respiratory tract (e.g., pharyngitis, tonsillitis, pneumonia) infections, as well as some dermatological infections. It is active against several different bacteria, such as staphylococci, Streptococcus pneumoniae, and group A beta-hemolytic streptococci. It can also be used for some urinary tract infections.

What To Do If Keflex Isn't Working

You didn't mention in your question what you are using Keflex for, so it is tough to give specific guidance regarding what may be happening if it doesn't seem to be working. However, for most infections, Keflex is usually given for 7 to 14 days in a row.

If one course of the antibiotic has not completely cleared your infection, there are some options for you.

Sometimes, your doctor may decide to continue on the drug for a longer period of time. More often, however, they will switch the antibiotic since an infection not being cured by a course of antibiotics is an indication it may not be susceptible to it (i.e., it may be resistant).

In your question, you stated you have had three courses of Keflex in a row. That's a very strong indication it isn't the right antibiotic choice for you. The bacteria causing your infection might not be sensitive to the Keflex, or it has developed some sort of resistance to it.

I highly recommend talking to your doctor about your options. If your infection is serious enough, your doctor can order a test known as a 'culture and sensitivity' where they can identify exactly what bacteria is causing your infection and what antibiotics will work for it.

They may also have a good indication of certain bacterial infections prevalent in your area and prescribe an antibiotic based on that information. Alternative antibiotics could include:

  • Sulfamethoxazole/trimethoprim
  • Doxycycline
  • Amoxicillin
  • Amoxicillin/clavulanate
  • Azithromycin
  • Cefuroxime
  • Cefdinir
  • Levofloxacin

Again, if I had a better idea of what you're treating, I could give more specific guidance.

Final Words

So, overall, there isn't a maximum duration of use that Keflex is safe for. It can be used as long as needed to treat an infection. If, however, you notice your infection not getting better after a course (or three courses in your case), that is an indication an alternative antibiotic is needed.

References & sources
  1. Keflex Prescribing Information — AccessFDA
  2. A Critical Review of Cephalexin and Cefadroxil for the Treatment of Acute Uncomplicated Lower Urinary Tract Infection in the Era of "Bad Bugs, Few Drugs" — PubMed
  3. Cephalexin Monograph — PubChem
Glossary — Terms in This Answer
Cephalosporin
A class of antibiotic drugs that work by killing bacteria and are related to penicillin antibiotics.
Gram-positive bacteria
A type of bacteria that has a thick cell wall and stains purple when tested in a laboratory.
Pharyngitis
An infection of the throat that causes pain and inflammation.
Tonsillitis
An infection of the tonsils, the small glands at the back of your throat.
Dermatological infections
Infections of the skin caused by bacteria, fungi, or other microorganisms.
Staphylococci
Spherical-shaped bacteria commonly found on skin that can cause various infections.
Resistant
When bacteria have developed the ability to survive and grow despite exposure to an antibiotic.
Culture and sensitivity
A laboratory test that identifies what bacteria is causing an infection and which antibiotics will effectively treat it.
Did this answer your question?
Dr. Brian Staiger, PharmD
About the pharmacist

Dr. Brian Staiger, PharmD

Clinical Pharmacy

Doctor of Pharmacy, board certified clinical pharmacist (BCPS), American Herbalist Guild, Medication Therapy Management certified

Brian Staiger, PharmD, BCPS, is a licensed pharmacist with more than 13 years of experience across retail pharmacy, clinical pharmacy, medication safety, pharmacy program development, and healthcare administration. He is the founder of HelloPharmacist.com, where he helps patients...

More answers from Brian →
Ask a Pharmacist