DataBrighten

    Expense (% of GDP)

    4,452 × 6rows × columns: 161 countries, 1972 to 2024

    Real data: World Bank, World Development Indicators, indicator GC.XPN.TOTL.GD.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows4,452country-year values
    Countries161with at least one value
    Years1972 – 202453 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    Expense is a decrease in net worth resulting from a transaction. This indicator is expressed as a percentage of Gross Domestic Product (GDP) which is the total income earned through the production of goods and services in an economic territory during an accounting period.

    Limits and exceptions (World Bank note)

    For most countries central government finance data have been consolidated into one account, but for others only budgetary central government accounts are available. Countries reporting budgetary data are noted in the country metadata. Because budgetary accounts may not include all central government units (such as social security funds), they usually provide an incomplete picture. In federal states the central government accounts provide an incomplete view of total public finance. Data on government revenue and expense are collected by the IMF through questionnaires to member countries and by the Organisation for Economic Co-operation and Development (OECD). Despite IMF efforts to standardize data collection, statistics are often incomplete, untimely, and not comparable across countries.

    The numbers in 2022

    In 2022, 111 countries have a value. The highest is Kiribati (81.53); the lowest is United Arab Emirates (3.81). The median country value is 28.19. The World Bank's World aggregate for 2022 is 28.49.

    Top 10 countries, 2022

    % of GDP

    Source: World Bank, GC.XPN.TOTL.GD.ZS, retrieved 19 November 2026. Computed from expense-percent-of-gdp.csv.

    Highest, 2022

    #CountryValue
    1Kiribati81.53
    2Ukraine57.89
    3Timor-Leste52.49
    4Greece50.8
    5Macao SAR, China49.17
    6France48.86
    7Italy48.37
    8Austria47.36
    9San Marino44.64
    10Slovenia43.55

    Lowest, 2022

    #CountryValue
    1United Arab Emirates3.81
    2Ethiopia7.3
    3Madagascar9.93
    4Lao PDR10.32
    5Tajikistan10.69
    6Equatorial Guinea11.05
    7Cambodia11.78
    8Congo, Dem. Rep.12.45
    9India13.73
    10Guatemala14
    How many countries report, by decade
    DecadeMost countries in one year
    1970s43
    1980s48
    1990s91
    2000s122
    2010s146
    2020s136

    World aggregate by year

    As published by the World Bank (in the regions file, not the country file).

    YearWorld
    202228.49
    202131.74
    202033.42
    201926.7
    201826.14
    201726.28
    201626.56
    201526.75
    201426.79
    201327.07
    201227.45
    201127.48

    By region, 2022

    World Bank regionValue
    Europe & Central Asia37.12
    Latin America & Caribbean 27.24
    North America24.06
    South Asia13.8

    First rows

    expense-percent-of-gdp.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200620.5781737687622
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200724.2432588226125
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200850.7192978736512
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200944.3178392396772
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income201050.8630045999057
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income201159.4847758807514
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income201242.3292514484608
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income201342.0936844468805

    Data dictionary

    ColumnTypeMeaning
    countrytextCountry or economy, World Bank name
    iso3textISO 3166-1 alpha-3 code
    regiontextWorld Bank region
    income_grouptextWorld Bank income group
    yearnumberCalendar year of the value
    valuenumberExpense (% of GDP), exactly as the World Bank API returns it (not rounded)

    Only country-years with a value are in the long file; blank cells in the wide file mean no value was published.

    Practice questions

    answers computed from the file

    Which country has the highest value in 2022?

    Kiribati, with 81.53.

    Excel (on the long CSV: E = year, F = value)

    =FILTER(A2:A100000,(E2:E100000=2022)*(F2:F100000=MAXIFS(F2:F100000,E2:E100000,2022)))

    SQL (table wb = the CSV)

    SELECT country, value FROM wb WHERE year = 2022
      AND value = (SELECT MAX(value) FROM wb WHERE year = 2022);

    pandas (df = pd.read_csv("expense-percent-of-gdp.csv"))

    y = df[df.year == 2022]
    y[y.value == y.value.max()][["country", "value"]]

    File: expense-percent-of-gdp.csv

    How many countries report a value for 2022?

    111 of the 217 economies in the file's country list.

    Excel (on the long CSV: E = year, F = value)

    =COUNTIF(E2:E100000,2022)

    SQL (table wb = the CSV)

    SELECT COUNT(*) FROM wb WHERE year = 2022;

    pandas (df = pd.read_csv("expense-percent-of-gdp.csv"))

    (df.year == 2022).sum()

    File: expense-percent-of-gdp.csv

    What is the median across countries in 2022?

    28.19 (median of the 111 country values; not a World Bank aggregate).

    Excel (on the long CSV: E = year, F = value)

    =MEDIAN(FILTER(F2:F100000,E2:E100000=2022))

    SQL (table wb = the CSV)

    -- SQLite has no MEDIAN(); this picks the middle value(s)
    SELECT AVG(value) FROM (SELECT value FROM wb WHERE year = 2022 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2022) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2022));

    pandas (df = pd.read_csv("expense-percent-of-gdp.csv"))

    df[df.year == 2022]["value"].median()

    File: expense-percent-of-gdp.csv

    Which country rose the most between 2012 and 2022?

    Macao SAR, China: from 10.9 to 49.17, a rise of 38.27 (out of 100 countries with both years).

    Excel (on the long CSV: E = year, F = value)

    Use the wide file (expense-percent-of-gdp-wide.csv): add a column = [2022] - [2012], then sort it largest to smallest.

    SQL (table wb = the CSV)

    SELECT a.country, b.value - a.value AS rise FROM wb a JOIN wb b ON a.iso3 = b.iso3
    WHERE a.year = 2012 AND b.year = 2022 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("expense-percent-of-gdp.csv"))

    w = df.pivot(index="country", columns="year", values="value")
    (w[2022] - w[2012]).dropna().nlargest(1)

    File: expense-percent-of-gdp.csv

    Which year has the most countries reporting?

    2015, with 146 countries. (Later years are still filling in as countries report.)

    Excel (on the long CSV: E = year, F = value)

    Make a pivot table: year in Rows, Count of value in Values, then sort by the count.

    SQL (table wb = the CSV)

    SELECT year, COUNT(*) AS n FROM wb GROUP BY year ORDER BY n DESC, year DESC LIMIT 1;

    pandas (df = pd.read_csv("expense-percent-of-gdp.csv"))

    df.groupby("year").size().sort_values(ascending=False).head(1)

    File: expense-percent-of-gdp.csv