Obamacare cut the number of uninsured LGB people by almost half, according to national survey data.

The Kaiser Family Foundation, a think tank devoted to health care policy, examined the number of LGB people who said they did not have health insurance on the CDC’s National Health Interview Survey (NHIS) in 2013 and 2016. These years are significant because the major provisions of the Affordable Care Act (ACA, also called “Obamacare”) went into effect in 2014.

Transgender people were not studied because the CDC did not break out data on gender identity.

The analysts found that 19% of LGB people between the ages of 18 and 64 reported being uninsured in 2013, but only 10% did in 2016, representing about 369,000 LGB people getting insurance in those three years.

The ACA improved insurance coverage of LGB people in several ways. First, it banned discrimination based on sexual orientation. It also banned insurers from refusing people with pre-existing conditions or charging them more, which is important when LGB people are disproportionately affected by conditions like HIV/AIDS and depression.

The law also made it easier for many people to afford health insurance. It created health insurance exchanges for people who aren’t covered through their jobs and gave subsidies to help people buy insurance. It also expanded Medicaid, a program that provides free or low-cost health insurance to people with low incomes.

The analysts at Kaiser found that 7% of LGB people were covered through Medicaid in 2013, and 15% got Medicaid in 2015. They didn’t have enough data to estimate how many LGB people got coverage through the exchanges or who got insurance because of the bans on discrimination.

The results are similar to a study by the Urban Institute in 2015, which used its own survey to look at changes in LGB health insurance rates. They found that the LGB uninsurance rate among adults ages 18 to 64 dropped by 10.6% from 2013 to 2015, compared to a 5.9% drop among heterosexual people in the same age bracket.

They also found that almost all of the drop occurred among people who make 400% of the Federal Poverty Level or less (about $47,000 for a single person), which is the cut-off for health insurance subsidies.

These studies show that the ACA has been important to a lot of LGB people.