How Our Debt Clocks Work
Every figure on our country debt clock pages is derived from a small set of fields stored for each country: a base debt amount, a reference date at which that amount was valid, an annual interest rate, a population, and a GDP. This page explains exactly how those inputs become the numbers you see, and – equally importantly – what the numbers do not represent.
Data Sources
Our debt clock data comes from the following authoritative sources, refreshed as described below:
| Data Point | Source | Coverage | Update Frequency |
|---|---|---|---|
| Debt amount (US) | US Treasury Fiscal Data API (debt-to-the-penny) | 1 country | Daily |
| Debt amount (all others) | IMF World Economic Outlook (GGXWDG_NGDP indicator) | 48 countries | Twice yearly (April/October WEO) |
| Population | World Bank API (SP.POP.TOTL indicator) | 49 countries | Annual |
| GDP (current USD) | World Bank API (NY.GDP.MKTP.CD indicator) | 49 countries | Annual |
| Currency exchange rates | TwelveData (primary), OpenExchangeRates (fallback), Frankfurter/ECB (cross-check) | 30 currencies | At each data refresh |
| Interest rate | See Interest Rate section below | 49 countries | Varies |
Debt Definition: General Government Gross Debt (GGXWDG)
For all countries except the United States, we use the IMF’s GGXWDG indicator: general government gross debt. This is broader than “central government debt” because it includes:
- Central government debt (treasury bonds, bills, and other securities)
- State and local government debt (where applicable)
- Social security fund liabilities
This matches the Maastricht definition used by Eurostat for EU member states and is the standard metric used in IMF and World Bank cross-country comparisons. It is the most comprehensive measure of a government’s total liabilities.
Why this matters
Our figures may differ from numbers published by individual countries because of definition scope. A country that reports only federal debt will show a lower number than our GGXWDG-based figure. Neither is wrong – they measure different things.
Country-specific exceptions
- United States: Uses the US Treasury’s “total public debt outstanding” figure, which includes intragovernmental holdings (money the government owes itself, such as Social Security trust funds). This is close to but not identical to GGXWDG.
- Canada: GGXWDG includes provincial debt. The old figure on this site excluded provincial debt (federal only). The current figure uses the IMF definition and will therefore be higher than federal-only sources.
- Singapore: Singapore’s high debt-to-GDP ratio (over 160%) is misleading without context. The government issues securities primarily for investment purposes (GIC, Temasek Holdings), not to finance budget deficits. Singapore’s net debt position is near zero.
- Norway: Norway’s central government is in a net asset position thanks to the Government Pension Fund (sovereign wealth fund). Gross debt figures do not reflect the country’s true fiscal position.
- China: The IMF’s GGXWDG estimate for China includes local government financing vehicles (LGFVs). Official Chinese figures exclude these and are significantly lower.
- Japan: Includes fiscal investment and loan program bonds. Japan has the highest debt-to-GDP ratio among advanced economies.
Where the IMF definition differs materially from a country’s self-reported figures, we note this in the Source field on that country’s debt clock page.
How Debt Amounts Are Computed
For the 48 non-US countries, we compute the debt amount from two separate datasets:
- IMF WEO GGXWDG_NGDP: General government gross debt as a percentage of GDP (from the IMF’s World Economic Outlook datamapper API)
- World Bank GDP (current USD): Gross domestic product in current US dollars
The debt amount in USD is then: (debt_pct_of_gdp / 100) × GDP_in_current_USD
This introduces a small margin of error (typically 1-3%) because the IMF and World Bank may use slightly different GDP estimates or reference periods. We accept this trade-off because it gives us a consistent, automated, and verifiable methodology for all countries using free, authoritative APIs.
For the United States, we use the US Treasury’s Fiscal Data API, which publishes the exact total public debt outstanding figure daily.
Data Freshness
As of April 2026, our data status is:
- Debt amounts: 48 countries updated with 2024 IMF WEO data. US updated daily from Treasury API.
- Population: All 49 countries updated with 2024 World Bank data.
- GDP: All 49 countries updated with 2024 World Bank data (current USD).
- Currency rates: All 30 non-USD currencies updated from TwelveData (April 2026).
- Interest rates: Not yet refreshed. Most rates date from 2015-2018. See the Interest Rate section below.
We plan to refresh non-interest-rate data at each WEO publication (April and October). Interest rate updates require country-by-country manual sourcing and are being addressed separately.
The Live Counter: How It Works
The counter you see ticking upward is not a live government data feed. No government publishes its debt balance in real time. The counter is a mathematical extrapolation:
- Start with the base debt amount as of the reference date.
- Calculate the annual interest accrual:
base debt × (interest rate / 100). - Divide by the number of seconds in a year to get an interest accrual per second:
annual interest / (365 × 24 × 60 × 60)=annual interest / 31,536,000. - Multiply the per-second rate by the number of seconds elapsed since the reference date.
- Add that to the base debt to produce the displayed total.
In reality, government borrowing is not continuous, interest is paid in lumps, and the effective rate varies with market conditions and budget cycles. The counter is an illustration of scale and direction. It is not a ledger.
Worked example (illustrative, not live data)
To show the arithmetic with round numbers: assume a country has a base debt of $1,000,000,000,000 (one trillion) on 1 January 2024 and an average effective interest rate of 3%.
- Annual interest: $1T × 0.03 = $30,000,000,000
- Per second: $30,000,000,000 / 31,536,000 = ~$951
- After 365 days, the counter would display: $1T + ($951 × 31,536,000) = $1.030T
This is an illustration of the formula. It does not reflect any specific country’s stored figures.
The Interest Rate Figure
The interest rate we store is intended to represent the country’s average effective interest rate on outstanding debt – the weighted average cost of all debt obligations, not a central bank policy rate.
Current status (April 2026): Interest rates have not yet been refreshed. Most stored rates date from 2015-2018 and are significantly outdated. For example, the US rate is stored at 0.8% vs an actual effective rate closer to 3-4%. This means the US counter ticks slower than reality.
Planned approach: Where the IMF publishes interest expenditure data (the GGINTP indicator), we plan to approximate the effective interest rate as:
effective_rate = (interest_expenditure / total_debt) × 100
This approximation is imperfect – it uses last year’s expenditure divided by current debt stock – but it is better than 8-year-old rates for most countries. For the top 10 countries by traffic, we also plan to source the actual weighted average cost from each country’s Debt Management Office (DMO) publications.
Interest rate accuracy directly controls the counter’s speed. An outdated rate makes the counter tick too fast or too slow. We consider this the highest-priority remaining data gap.
The Other Figures
Interest Payments Per Year
Calculated as: base debt × (interest rate / 100). This is an estimate of annual interest cost at the stored rate. It is not the government’s declared interest expenditure for the current fiscal year.
Interest Per Second
Annual interest divided by seconds in a year, as above. This figure drives the live counter.
National Debt Per Citizen
The extrapolated current debt total divided by the stored population figure. Population data is sourced from the World Bank (2024 data).
Debt as % of GDP
Extrapolated debt total divided by stored GDP (World Bank 2024 data, current USD), expressed as a percentage.
Two thresholds appear in international discussion of this ratio: the 60% ceiling set by the Maastricht Treaty for European Union members, and a 90% level that appeared in a widely cited 2010 Harvard paper by Reinhart and Rogoff. The 90% figure should be treated with caution – a 2013 replication found the original result rested partly on a spreadsheet error and unconventional weighting. Economists today disagree on whether any single debt-to-GDP threshold carries predictive power. We use these numbers only as reference points, not as verdicts.
Visualisations (Earth wraps, Moon trips)
Calculated from the extrapolated debt total using fixed physical constants that match the plugin code exactly:
- Earth wraps: total debt (in $1 bills, each 15.6 cm long) / Earth’s circumference (40,075 km)
- Pile height: total debt × 0.010921 cm (thickness of a $1 bill), converted to kilometres
- Moon trips: pile height in km / 384,403 km (average Earth-Moon distance)
Currency Conversion
Countries whose debt is stored in USD have a stored exchange rate used to display the figure in local currency. Exchange rates are sourced from TwelveData (primary) and cross-checked against OpenExchangeRates and ECB/Frankfurter data. Rates are updated at each data refresh but are not live – they are a snapshot taken at refresh time. If a country’s exchange rate moves significantly between refreshes, the local currency figure will lag the market.
What These Pages Are Not
- Not a real-time government feed. No government publishes its debt balance in real time. The counter is an extrapolation.
- Not net debt. Figures represent gross government debt (all liabilities). Net debt (liabilities minus financial assets) would typically be lower. Countries like Norway and Singapore have large sovereign wealth funds that offset their gross debt.
- Not inflation-adjusted. All figures are nominal (current-price dollars), not real.
- Not a fiscal health score. A high debt-to-GDP ratio does not automatically mean a country is in trouble. Japan has operated above 200% for decades. Context matters – the interest rate, currency of denomination, domestic vs. foreign holders, and growth trajectory all affect sustainability.
Known Limitations
- Interest rates are outdated. Most stored interest rates date from 2015-2018. This affects the counter speed and the interest payment figures. This is our highest-priority data gap.
- Exchange rates are refreshed periodically, not in real time.
- The counter assumes continuous accrual; real debt changes in lumps.
- Debt amounts are computed from two separate datasets (IMF % of GDP + World Bank GDP), introducing ~1-3% rounding variance.
- Some countries have definition differences noted in their Source field and in the Exceptions section above.
Reporting an Error
If you spot a figure that contradicts a primary government source, please contact us with a link to the source. We prioritise corrections on high-traffic pages first.
Last reviewed: April 2026. Questions? Contact us.
The Commodity Briefing
The stories behind the prices. Surprising, useful, occasionally weird - in your inbox every weekday.
- Price moves
- Supply shocks
- Macro drivers
Before you go
Get The Commodity Briefing - free, 2 minutes.