President Obama's healthcare law will spend about $2 trillion over the next decade on expanding insurance coverage but still leave 31 million Americans uninsured, according to an analysis from the Congressional Budget Office released on Monday.

When Obama pitched the healthcare law to Congress, he said it would cost "around $900 billion" over 10 years. But his statement was misleading because the way the law was designed, the major spending provisions didn't kick in until 2014. This meant that 10-year estimates at the time the law was passed in 2010 were artificially low, because they included four years (2010 through 2013) in which spending was negligible.

The new CBO analysis finds that between fiscal years 2016 and 2025, spending on the law's expansion of Medicaid will cost $920 billion and insurance exchange subsidies will cost nearly $1.1 trillion. The major spending provisions, taken together, will total $1.993 trillion.

Obamacare does include tax increases and Medicare cuts that previous CBO reports have found would offset the new spending, but CBO is no longer providing a full budgetary analysis of the law.

The CBO also said it expected the law's exchanges to cover 21 million by the end of the 2016 fiscal year and for Medicaid to cover an additional 13 million — gains that it projects will be partially offset by a reduction of 11 million people in employer or other existing coverage.

By 2025, the end of the projection period, the CBO projects that Obamacare will increase insurance coverage by a net of 27 million, while 31 million will remain uninsured.