The most effective way to prevent tuberculosis is to finish TB treatment if you have it, and to take preventive medication if you've been exposed

Tuberculosis prevention works differently depending on your situation. If you have active TB disease, finishing your full course of antibiotics—usually four drugs taken for two months, then two drugs for four more months—stops you from spreading it to others. If you've been exposed to someone with TB or have a positive skin test but no symptoms, preventive medication (most commonly isoniazid taken daily for six to nine months) can stop the infection from becoming active disease. If you have no known exposure, the main prevention is avoiding close contact with people who have untreated TB.

The reason TB prevention matters is straightforward: TB spreads through the air when an infected person coughs, sneezes, or speaks. You cannot catch it from touching someone or sharing food. But in a shared household or workplace, prolonged close contact creates real risk. Prevention interrupts that chain at multiple points—by treating active disease, by stopping latent infection from progressing, and by identifying who needs testing after exposure.

Key Takeaways

  • If you have active TB, taking all your prescribed antibiotics for the full six months is the single most important prevention step—it stops you from infecting others within two to three weeks of starting treatment.
  • If you have latent TB infection (positive test, no symptoms), preventive medication taken as prescribed can reduce your risk of developing active disease by about 60 to 90 percent.
  • Close contacts of someone with active TB should get tested and, if positive, start preventive medication even if they have no symptoms.
  • Healthcare workers, people with HIV, and those in congregate settings like shelters or prisons face higher TB risk and may benefit from preventive medication even without known exposure.

Finishing TB treatment completely stops transmission

If you have been diagnosed with active tuberculosis, your primary role in prevention is completing your entire course of antibiotics exactly as prescribed. The standard regimen is four drugs (isoniazid, rifampin, pyrazinamide, and ethambutol) taken together for two months, followed by isoniazid and rifampin alone for four more months. This six-month total is not negotiable—stopping early allows the bacteria to survive and develop resistance, which makes the disease harder to treat and keeps you contagious longer.

You become non-contagious relatively quickly once treatment starts—usually within two to three weeks—but the bacteria are still present in your body. Finishing the full course kills them completely. Missing doses or stopping early is the main reason TB treatment fails. If you struggle with the schedule, tell your doctor. Options include directly observed therapy (DOT), where a health worker watches you take each dose, or adjusted schedules that fit your life better. Many TB clinics offer this at no cost.

During treatment, you can live normally—go to work, see family, attend school. You are not contagious after those first few weeks. But tell close contacts (household members, people you spend eight or more hours per week with) that you have TB so they can get tested. They may need preventive medication even if they have no symptoms.

Preventive medication for latent TB infection

Latent TB infection means the bacteria are in your body but dormant—you have no symptoms, you cannot spread TB, and you may never develop active disease. But the risk is real: about 5 to 10 percent of people with latent infection develop active TB at some point in their life, and the risk is much higher if your immune system is weakened (by HIV, for example, or by medications that suppress immunity).

Preventive medication reduces that risk substantially. The most common option is isoniazid taken daily for six to nine months. Newer regimens exist—rifapentine plus isoniazid taken weekly for 12 weeks, or rifampin alone for four months—and your doctor will choose based on your situation, other medications you take, and what your TB test showed. The goal is the same: kill the dormant bacteria before it can activate.

Preventive medication works only if you take it consistently. Missing doses reduces its effectiveness. If you have side effects—nausea, tingling in your hands or feet, or rarely, liver problems—tell your doctor immediately. Do not stop on your own. Your doctor can adjust the dose, switch medications, or manage the side effect so you can continue. Finishing the full course is what matters.

Who should get tested and considered for preventive treatment

Testing for TB infection is the first step in prevention for people at higher risk. You should get tested if you have spent significant time (generally eight or more hours per week for several weeks) with someone who has active TB disease. Close contacts include household members, coworkers in the same office, and people in shared living spaces like shelters or dormitories.

Certain groups face higher TB risk even without known exposure and may be tested routinely. These include people with HIV, people taking medications that suppress the immune system (like TNF inhibitors for rheumatoid arthritis), healthcare workers, people who work in or live in congregate settings (prisons, shelters, nursing homes), and people born in countries where TB is common. Your doctor or local health department can tell you whether testing makes sense for you.

Testing involves either a skin test (tuberculin skin test, or TST) or a blood test (interferon-gamma release assay, or IGRA). Both detect TB infection but do not distinguish between latent and active disease. If your test is positive, you will need a chest X-ray to rule out active TB. If the X-ray is normal, you have latent infection and are a candidate for preventive medication.

Reducing TB transmission in households and workplaces

If someone in your household has active TB, the risk to you depends on how long you spend together and how well the infected person's disease is controlled. Once they start treatment and become non-contagious (usually within three weeks), the risk drops sharply. Until then, ventilation matters: open windows, use fans to move air out of the house, and spend time in separate rooms when possible.

In workplaces, TB transmission is rare if the infected person is already on treatment. If someone develops active TB while still working, your employer or occupational health service should notify close contacts so they can get tested. Healthcare settings have specific protocols: patients with suspected or confirmed TB are isolated in negative-pressure rooms (air flows out, not in), and staff wear respiratory protection (N95 masks or better) when entering.

For people who work in high-risk settings—hospitals, clinics, shelters, prisons—regular TB testing is standard practice. Some facilities offer preventive medication to staff with latent infection, especially those with frequent TB exposure. Ask your occupational health department what screening and prevention options are available to you.

What to do if you have been exposed to someone with TB

If you learn that someone you spent time with has active TB, contact your doctor or local health department right away. You do not need to panic—most exposures do not result in infection—but you do need to be tested. The health department can often arrange free testing and will help identify other people who may have been exposed.

Testing is usually done four to eight weeks after exposure, because it takes time for your immune system to react to the bacteria. If your first test is negative, you may be retested at 12 weeks to be certain. If your test is positive, a chest X-ray will determine whether you have latent or active TB. If latent, preventive medication is strongly recommended.

During the waiting period before testing, you are not contagious (you do not have active disease). You can go to work, school, and social activities normally. But if you develop symptoms—persistent cough, fever, night sweats, weight loss—see a doctor immediately and mention the TB exposure. Do not wait for your scheduled test.

TB prevention in people with HIV or weakened immunity

People with HIV face much higher risk of developing active TB if they have latent infection. Without preventive medication, the risk can be 50 percent or higher over a lifetime. This is why TB testing is part of routine HIV care, and why preventive medication is often recommended even for people with latent TB and no symptoms.

The choice of preventive medication may differ for people with HIV because of interactions with antiretroviral drugs. Your HIV doctor and TB specialist will coordinate to find a regimen that works for both conditions. Starting antiretroviral therapy (which restores immune function) alongside TB preventive medication is standard. The combination is more effective than either alone.

People taking other medications that suppress immunity—such as TNF inhibitors for rheumatoid arthritis or biologics for inflammatory bowel disease—also have higher TB risk. If you take these medications and have latent TB infection, preventive medication is usually recommended. Your rheumatologist or gastroenterologist can discuss this with you and coordinate with a TB specialist if needed.

Frequently Asked Questions

Can I catch TB from someone who is on treatment?

No, not after the first two to three weeks of treatment. Once someone with active TB starts antibiotics, they stop being contagious fairly quickly. The bacteria are still in their body, but they cannot spread through the air. You can be around them normally—hug them, share meals, work in the same office.

How long does preventive medication take to work?

Preventive medication does not work instantly. It kills dormant bacteria over weeks and months. You need to take it for the full prescribed course—usually six to nine months—to get the full benefit. Stopping early leaves you at higher risk of developing active TB later.

What if I cannot tolerate the preventive medication?

Tell your doctor about side effects right away. Options include adjusting the dose, switching to a different medication, taking it less frequently, or managing the side effect with another drug. Do not stop on your own. Your doctor can find a way to make it work.

Do I need a TB test if I was vaccinated with BCG?

Yes. The BCG vaccine (common outside the United States) provides some protection against TB but is not completely reliable. If you have been exposed to someone with active TB or have symptoms, you should still be tested. A positive test means you need evaluation for latent or active TB regardless of BCG history.

Is TB preventive medication safe during pregnancy?

Yes, isoniazid is considered safe during pregnancy and is the standard choice for pregnant people with latent TB infection. The risk of TB disease to you and your baby is greater than the risk from the medication. Discuss your specific situation with your doctor, but do not avoid preventive treatment because of pregnancy.