The arithmetic is about the debt ratio, debt divided by GDP, because a bigger economy can carry more debt. Three things move the ratio. Interest on the existing debt adds to it at rate r. Growth of GDP, measured on the same basis as r, shrinks it at rate g. And the primary balance, the budget excluding interest, adds or subtracts directly. If r is above g, the ratio rises by itself unless the government runs a primary surplus. If r is below g, the ratio can hold steady even with a modest primary deficit, for as long as that gap lasts.
Take a country whose debt is 100% of GDP, with an interest rate of 3% and nominal GDP growing 4%. With a balanced primary budget, next year's ratio is 100 × 1.03 / 1.04 = 99.0%. Growth alone takes about a point off, so the government could run a primary deficit of about 1% of GDP and still end the year at 100. Now let the interest rate rise to 5%. The ratio becomes 100 × 1.05 / 1.04 = 101.0%, and holding it at 100 takes a primary surplus of about 1% of GDP. A two-point rise in the interest rate has turned room to borrow into a need to tighten by about two points of GDP, every year.
There is no debt ratio at which trouble begins. On the IMF's measure, Japan's gross government debt was above 200% of GDP every year from 2013 to 2025 without a funding crisis, while Argentina defaulted in December 2001 at 48%. Japan borrows in yen, and more than 90% of its government bonds, not counting short-term bills, are held at home, almost half of them by its central bank. Nearly all of Argentina's debt was owed in foreign currency it could not create. Who holds the debt, in what currency and for how long matters as much as the total. Nor is a government a household that must pay its debt off; it has to keep the ratio from rising without limit. How deficits affect demand is on the Fiscal Policy page, and how they affect interest rates and investment is in Loanable Funds.