The deficit as about half the size, when Obama was leaving office, as when he took office.
There are two ways to look at the U.S. budget deficit when determining which president has run the largest deficit. The first is to look at each president's term or terms in office, total the deficits run over the course of their four or eight years, and base your conclusions on those numbers. According to this method, Barack Obama's budget deficit was $6.69 trillion over his eight years, making him the president with the largest budget deficit.
The laws governing the federal fiscal year are the reason a second way to look at budget deficits is on a year-by-year basis. In years when a new president is elected, there are two plans at work: the old plan laid out by the previous administration and the new plan brought in by the new president. The single-largest budget deficit in U.S. history happened during such a year; the 2009 fiscal year clocked a $1.412 trillion deficit. For the first third of that year, President George W. Bush was in office, while for the last eight months, Barack Obama took the White House.
https://www.investopedia.com/ask/answers/030515/which-united-states-presidents-have-run-largest-budget-deficits.asp