As the title suggests, I would like to know whether the numbers are generally calculated with real or nominal GDP. Besides that I would also like to know whether it matters and how significant of a difference this could make.
Usually, the debt/gdp ratio has no unit. For instance, if the debt is equal to 60% of the gdp, the debt/gdp ratio is 0.6. If you use real gdp as denominator and nominal debt as numerator, you end up with a number which is less clear to interpret. It is more relevant to have either both variables in nominal terms or both in real terms. In these two cases, the result is the same.
If you denote D and GDP respectively nominal debt and nominal GDP. As long as you take the same price index P, the ratio in nominal variables, D/GDP, and the ratio in real variables, (D/P)/(GDP/P) are mathematically identical.
In my experience the ratio of nominals is far more common than the ratio of reals. Nominals are useful when the topic is current spending. Reals are useful when the topic is growth apart from changes in the value of money.
GDP is the sum of one year's final spending. Given annual data for GDP and prices, there is only one year's price level embedded in any one year's GDP number.
Debt is the accumulation of borrowing (less repayment) over many years. So the price levels of many years come into play even when only one year's nominal debt is converted to a real (inflation-adjusted) number.
Because many years' price levels are embedded in one year's debt, the calculation of real debt is not the same as the calculation of real GDP. Because the calculations differ, the ratio of reals is not identical to the ratio of nominals.
People often assume that the calculation used for real GDP can also be used for real debt. Using the same calculation gives a ratio of reals that is identical to the ratio of nominals. When the topic is current value ("how much is it now") no harm is done by this mistake. But when the topic is growth ("how much bigger is it now") the wrong calculation gives incorrect information ("The public debt remained fairly constant from the late 1940s through 1981") and may lead to serious or fatal errors in policy.