DataBrighten

    External balance on goods and services (% of GDP)

    9,029 × 6rows × columns: 194 countries, 1960 to 2025

    Real data: World Bank, World Development Indicators, indicator NE.RSB.GNFS.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows9,029country-year values
    Countries194with at least one value
    Years1960 – 202566 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    The balance of international trade in goods and services is the difference between the exports and imports of goods and services. 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.

    The numbers in 2025

    In 2025, 138 countries have a value. The highest is Macao SAR, China (45.43); the lowest is Somalia, Fed. Rep. (-69.57). The median country value is -1.84. The World Bank's World aggregate for 2025 is 0.982.

    Top 10 countries, 2025

    % of GDP

    Source: World Bank, NE.RSB.GNFS.ZS, retrieved 19 November 2026. Computed from external-balance-on-goods-and-services-percent-of-gdp.csv.

    Highest, 2025

    #CountryValue
    1Macao SAR, China45.43
    2Ireland40.17
    3Singapore35.4
    4Luxembourg31.16
    5Gabon26.09
    6Brunei Darussalam19.53
    7Malta19.2
    8Equatorial Guinea18.11
    9Djibouti14.69
    10Chad12.7

    Lowest, 2025

    #CountryValue
    1Somalia, Fed. Rep.-69.57
    2Lesotho-54.92
    3Micronesia, Fed. Sts.-48.82
    4Marshall Islands-43.83
    5Naoero-41.91
    6Kyrgyz Republic-38.78
    7Gambia, The-36.71
    8West Bank and Gaza-32.3
    9Kosovo-30.29
    10Moldova-29.16
    How many countries report, by decade
    DecadeMost countries in one year
    1960s75
    1970s106
    1980s127
    1990s163
    2000s179
    2010s185
    2020s184

    World aggregate by year

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

    YearWorld
    20250.982
    20240.966
    20230.774
    20220.771
    20210.932
    20200.648
    20190.543
    20180.674
    20170.747
    20160.737
    20150.753
    20140.878

    By region, 2025

    World Bank regionValue
    East Asia & Pacific4.08
    Europe & Central Asia2.7
    Sub-Saharan Africa -0.0197
    Latin America & Caribbean -0.285
    South Asia-2.43

    First rows

    external-balance-on-goods-and-services-percent-of-gdp.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income2020-25.8682602741689
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income2021-22.727410779653
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income2022-36.1253848053787
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income2023-34.5290211783168
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income2024-52.3575213918718
    AlbaniaALBEurope & Central AsiaUpper middle income19800.420891317151782
    AlbaniaALBEurope & Central AsiaUpper middle income19811.52054703574025
    AlbaniaALBEurope & Central AsiaUpper middle income1982-4.66472579620985

    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
    valuenumberExternal balance on goods and services (% 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 2025?

    Macao SAR, China, with 45.43.

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

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

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("external-balance-on-goods-and-services-percent-of-gdp.csv"))

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

    File: external-balance-on-goods-and-services-percent-of-gdp.csv

    How many countries report a value for 2025?

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

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

    =COUNTIF(E2:E100000,2025)

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("external-balance-on-goods-and-services-percent-of-gdp.csv"))

    (df.year == 2025).sum()

    File: external-balance-on-goods-and-services-percent-of-gdp.csv

    What is the median across countries in 2025?

    -1.84 (median of the 138 country values; not a World Bank aggregate).

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

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

    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 = 2025 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2025) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2025));

    pandas (df = pd.read_csv("external-balance-on-goods-and-services-percent-of-gdp.csv"))

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

    File: external-balance-on-goods-and-services-percent-of-gdp.csv

    Which country rose the most between 2015 and 2025?

    Congo, Rep.: from -35.61 to 4.38, a rise of 39.98 (out of 137 countries with both years).

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

    Use the wide file (external-balance-on-goods-and-services-percent-of-gdp-wide.csv): add a column = [2025] - [2015], 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 = 2015 AND b.year = 2025 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("external-balance-on-goods-and-services-percent-of-gdp.csv"))

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

    File: external-balance-on-goods-and-services-percent-of-gdp.csv

    Which year has the most countries reporting?

    2018, with 185 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("external-balance-on-goods-and-services-percent-of-gdp.csv"))

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

    File: external-balance-on-goods-and-services-percent-of-gdp.csv