The antibiotics used for pneumonia depend on where you caught the infection, how severe it is, and which type of bacteria is likely causing it. Most people treated at home receive amoxicillin, doxycycline, or azithromycin. People hospitalized with pneumonia typically get stronger, broader-spectrum drugs, often through an IV. Here’s how doctors decide which antibiotic fits each situation.
Outpatient Pneumonia: The First-Line Options
If you’re otherwise healthy and your pneumonia is mild enough to treat at home, your doctor will generally choose from three antibiotic classes. Each one kills bacteria differently, and the choice depends partly on what’s most likely causing your infection and partly on your allergy history and other medications.
Amoxicillin is the most common starting point for straightforward community-acquired pneumonia. It’s a beta-lactam antibiotic, meaning it works by breaking down the walls bacteria need to survive. It’s effective against Streptococcus pneumoniae, the single most common bacterial cause of pneumonia in adults and children.
Doxycycline is frequently used as an alternative first choice, especially when doctors suspect an “atypical” pathogen (more on that below). It covers a broad range of bacteria and is well tolerated by most adults, though it’s avoided in children under eight because it can stain developing teeth.
Azithromycin (commonly known by the brand name Z-Pack) remains widely prescribed, typically at 500 mg once daily for three to five days. Its convenience and short course make it popular, but there’s a growing problem: roughly 40% of Streptococcus pneumoniae isolates in the U.S. now show resistance to macrolide antibiotics like azithromycin, and that rate has been climbing by about 5% per year. This means azithromycin alone may not reliably treat typical bacterial pneumonia in many regions, and some guidelines now discourage using it as the sole antibiotic unless atypical bacteria are strongly suspected.
Atypical Pneumonia Needs Different Coverage
Not all pneumonia is caused by the usual suspects. Organisms like Mycoplasma pneumoniae, Legionella, and Chlamydophila pneumoniae cause what’s called “atypical” pneumonia. These bacteria lack cell walls or live inside your cells, so antibiotics like amoxicillin that target cell walls won’t work against them.
Atypical pneumonia is treated with antibiotics that get inside cells and disrupt bacterial protein production or DNA replication. The go-to options are doxycycline, azithromycin, and clarithromycin. Fluoroquinolones like levofloxacin and moxifloxacin also cover atypical pathogens effectively because they block bacteria from copying their DNA.
Doctors sometimes can’t tell from symptoms alone whether pneumonia is typical or atypical. When both are possible, especially in people sick enough to be hospitalized, the standard approach is to combine a beta-lactam (for typical bacteria) with a macrolide or doxycycline (for atypical bacteria), covering both bases at once.
What Changes When You’re Hospitalized
Hospitalized patients with community-acquired pneumonia usually receive a combination of IV antibiotics. A typical regimen pairs a beta-lactam like ceftriaxone with azithromycin or doxycycline. For more severe cases, a respiratory fluoroquinolone such as levofloxacin or moxifloxacin may be used instead, since these single drugs cover both typical and atypical bacteria.
A meta-analysis comparing fluoroquinolone monotherapy to beta-lactam/macrolide combinations in hospitalized patients found similar outcomes for both strategies, suggesting either approach is reasonable depending on local resistance patterns and patient factors.
Hospital-Acquired and Ventilator-Associated Pneumonia
Pneumonia that develops while you’re already in the hospital is a different problem. The bacteria circulating in hospitals are often more resistant than those in the community, which means treatment has to be more aggressive from the start.
For hospital-acquired pneumonia, doctors choose from broad-spectrum antibiotics like piperacillin-tazobactam, cefepime, or carbapenems (imipenem or meropenem). These cover a wider range of gram-negative bacteria, including Pseudomonas aeruginosa, a notoriously tough organism common in ICU settings.
If MRSA (methicillin-resistant Staphylococcus aureus) is a concern, vancomycin or linezolid is added to the regimen. In ICUs where more than 10% of gram-negative bacteria are resistant to the initial antibiotic, guidelines recommend using two drugs from different classes to improve the odds that at least one will work. Once lab results come back showing exactly which bacteria are present and what they’re sensitive to, the regimen is usually narrowed down.
Aspiration Pneumonia
When food, saliva, or stomach contents are inhaled into the lungs, the resulting infection often involves anaerobic bacteria that thrive without oxygen. Standard pneumonia antibiotics don’t always cover these organisms well.
Aspiration pneumonia is commonly treated with amoxicillin-clavulanate (which adds anaerobic coverage to a standard beta-lactam) or moxifloxacin. Another approach combines a standard antibiotic like ceftriaxone or levofloxacin with clindamycin or metronidazole, both of which specifically target anaerobic bacteria.
If You Have a Penicillin Allergy
A penicillin allergy doesn’t leave you without options, but it does change the playbook. For mild allergies (a rash years ago, for example), many people can safely take certain related beta-lactam antibiotics like cephalosporins, since true cross-reactivity is low. Your doctor may recommend allergy testing to clarify your risk.
For people with severe reactions like anaphylaxis, Stevens-Johnson syndrome, or other serious immune-mediated responses, all beta-lactam antibiotics should be avoided. In these cases, respiratory fluoroquinolones (levofloxacin, moxifloxacin) or doxycycline become the primary treatment options. These work through entirely different mechanisms and pose no cross-reactivity risk with penicillin.
How Long Treatment Typically Lasts
Traditional pneumonia guidelines called for 7 to 10 days of antibiotics, and many doctors still prescribe courses of that length. But a growing body of evidence supports shorter treatment. A systematic review of 16 randomized trials involving nearly 13,000 patients found with high certainty that antibiotic courses of five days or fewer were just as effective as longer courses for preventing death from community-acquired pneumonia.
The World Health Organization already recommends three to five days for children with pneumonia in many settings. For adults, the trend is similar: most guidelines now suggest that five days is sufficient for uncomplicated cases, provided the patient has been fever-free for at least 48 hours and symptoms are clearly improving. Complicated cases, hospital-acquired infections, or pneumonia caused by certain resistant organisms may still require longer treatment.
Why the “Right” Antibiotic Varies So Much
Pneumonia isn’t one disease. It’s an umbrella term for lung infections that can be caused by dozens of different bacteria (plus viruses and fungi, which antibiotics don’t treat at all). The choice of antibiotic hinges on several factors: whether you caught it at home or in a hospital, your age, your other medical conditions, local resistance patterns in your community, and how sick you are at the time of diagnosis.
This is why two people with pneumonia can walk out of the same clinic with completely different prescriptions, and both can be correct. What matters most is that the antibiotic matches the likely cause, that you take the full course as prescribed, and that you follow up if symptoms aren’t improving within two to three days.

