Former President Obama left office having added $9.3 trillion to the national debt, according to numbers from the Treasury Department.

When Obama took office on Jan. 20, 2009, the outstanding public debt totaled $10,626,877,048,913. On Jan. 20, 2017, when Obama left office, outstanding public debt totaled $19,944,429,217,106, an increase of roughly $9.3 trillion.

Comparatively, former President George W. Bush contributed far less to the debt. When Bush took office in January 2001, the debt was roughly $5.7 trillion. That figure had swollen to $10.6 trillion by the time he left office, an increase of about $4.9 trillion.

"Federal debt is made up of debt held by the public and debt held by government accounts," stated a recent report by the Government Accountability Office. "Total debt rose to $19.7 trillion during fiscal year 2016, an increase of $1.4 trillion from fiscal year 2015."

The annual deficit grew in 2016 due to increased spending on Social Security, Medicare and Medicaid, and interest on the debt. These factors increased the 2016 deficit to $587 billion, up from $439 billion in 2015.

Spending on these programs is set to increase more rapidly than gross domestic product growth in the coming decades.

"Spending for the major health and retirement programs will increase more rapidly than GDP in coming decades as more members of the baby-boom generation become eligible for benefits," the report stated.

As such, debt is expected to rise as a share of GDP, from 74 percent in 2015 to 77 percent at the end of fiscal 2016. This is much higher than the average rate of 44 percent of GDP seen since 1946.

"Absent policy changes, the federal government's fiscal path is unsustainable and that the debt-to-GDP ratio would surpass its historical high of 106 percent within 15 to 25 years," the Government Accountability Office states.