The United States is taking on too much debt right now, a problem that is will only worsen moving forward, former Federal Reserve Chair Janet Yellen said Tuesday.

"If I had a magic wand, I would raise taxes and cut retirement spending," Yellen told CNBC's Steve Liesman at the Charles Schwab Impact conference in Washington, D.C., who characterized the U.S. debt path as "unsustainable."

The U.S. fiscal deficit rose to $779 billion in fiscal 2018, up 17 percent from the previous fiscal year. This happened after President Donald Trump signed a bill late last year slashing the corporate tax rate to 21 percent from 35 percent. Spending levels climbed to their highest in six years while revenue only increased slightly.