The expansion of Medicaid in 30 states accounted for a majority of the coverage gains in Obamacare, not the law's exchanges, a new study found.

Sixty percent of the Affordable Care Act's 2014 coverage gains were caused by the Medicaid expansion and 40 percent from the subsidies offered on the Obamacare marketplaces, the study found. Federal figures estimate roughly 20 million people have gained insurance under Obamacare, but how those people got insurance has been hotly debated.

The study, published recently by the National Bureau of Economic Research, found that the individual mandate's exemptions and penalties had "little impact on coverage decisions."

However, 2014 was the first year that the individual mandate penalty, levied against people who don't have insurance, went into effect. The penalty was roughly $90 and has grown to more than $600 for not having insurance in 2016.

Obamacare did increase Medicaid coverage both among newly eligible populations and "those who were previously eligible" for Medicaid.

Thirty-one states and the District of Columbia have expanded Medicaid.

Researchers used enrollment data from around the country and made various estimates on Obamacare coverage.

The study includes controversial Massachusetts Institute of Technology healthcare economist Jonathan Gruber among the authors. Gruber was one of the architects of Obamacare, and recently was caught saying the healthcare law passed due to "the stupidity of the American voter."