DataBrighten

    Foreign liabilities (current US$)

    3,831 × 6rows × columns: 150 countries, 1995 to 2020

    Real data: World Bank, Wealth Accounts, indicator NW.NFL.TO.CD, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows3,831country-year values
    Countries150with at least one value
    Years1995 – 202026 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    Nominal foreign liabilities include portfolio equity liabilities, foreign direct investment (FDI) liabilities, debt liabilities, and financial derivatives liabilities. The values are reported in current US dollars, obtained directly from the External Wealth of Nations (EWN) database.

    The numbers in 2020

    In 2020, 150 countries have a value. The highest is United States (46.75 trillion); the lowest is Comoros (384.00 million). The median country value is 74.47 billion.

    Top 10 countries, 2020

    current US$

    Source: World Bank, NW.NFL.TO.CD, retrieved 19 November 2026. Computed from foreign-liabilities-current-usd.csv.

    Highest, 2020

    #CountryValue
    1United States46.75 trillion
    2United Kingdom17.88 trillion
    3Luxembourg13.58 trillion
    4France10.79 trillion
    5Netherlands10.28 trillion
    6Germany10.18 trillion
    7Ireland9.12 trillion
    8Japan7.62 trillion
    9China6.58 trillion
    10Switzerland5.12 trillion

    Lowest, 2020

    #CountryValue
    1Comoros384.00 million
    2Sao Tome and Principe734.00 million
    3Solomon Islands833.00 million
    4Guinea-Bissau1.61 billion
    5Liberia1.86 billion
    6Eswatini2.15 billion
    7Gambia, The2.20 billion
    8Lesotho2.24 billion
    9Central African Republic2.27 billion
    10St. Lucia2.94 billion
    How many countries report, by decade
    DecadeMost countries in one year
    1990s145
    2000s149
    2010s150
    2020s150

    First rows

    foreign-liabilities-current-usd.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AlbaniaALBEurope & Central AsiaUpper middle income1995621000000
    AlbaniaALBEurope & Central AsiaUpper middle income1996734000000
    AlbaniaALBEurope & Central AsiaUpper middle income1997788000000
    AlbaniaALBEurope & Central AsiaUpper middle income1998972000000
    AlbaniaALBEurope & Central AsiaUpper middle income19991159000000
    AlbaniaALBEurope & Central AsiaUpper middle income20001609000000
    AlbaniaALBEurope & Central AsiaUpper middle income20011843000000
    AlbaniaALBEurope & Central AsiaUpper middle income20021990000000

    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
    valuenumberForeign liabilities (current US$), 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 2020?

    United States, with 46.75 trillion.

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

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

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("foreign-liabilities-current-usd.csv"))

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

    File: foreign-liabilities-current-usd.csv

    How many countries report a value for 2020?

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

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

    =COUNTIF(E2:E100000,2020)

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("foreign-liabilities-current-usd.csv"))

    (df.year == 2020).sum()

    File: foreign-liabilities-current-usd.csv

    What is the median across countries in 2020?

    74.47 billion (median of the 150 country values; not a World Bank aggregate).

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

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

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

    pandas (df = pd.read_csv("foreign-liabilities-current-usd.csv"))

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

    File: foreign-liabilities-current-usd.csv

    Which country rose the most between 2010 and 2020?

    United States: from 24.28 trillion to 46.75 trillion, a rise of 22.47 trillion (out of 149 countries with both years).

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

    Use the wide file (foreign-liabilities-current-usd-wide.csv): add a column = [2020] - [2010], 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 = 2010 AND b.year = 2020 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("foreign-liabilities-current-usd.csv"))

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

    File: foreign-liabilities-current-usd.csv

    Which year has the most countries reporting?

    2020, with 150 countries.

    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("foreign-liabilities-current-usd.csv"))

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

    File: foreign-liabilities-current-usd.csv