DataBrighten

    People using at least basic sanitation services (% of population)

    5,166 × 6rows × columns: 214 countries, 2000 to 2024

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

    textnumberdateyes/no
    Rows5,166country-year values
    Countries214with at least one value
    Years2000 – 202425 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    The percentage of people using at least basic sanitation services, that is, improved sanitation facilities that are not shared with other households. This indicator encompasses both people using basic sanitation services as well as those using safely managed sanitation services. Improved sanitation facilities include flush/pour flush to piped sewer systems, septic tanks or pit latrines; ventilated improved pit latrines, composting toilets or pit latrines with slabs.

    Limits and exceptions (World Bank note)

    National, regional and income group estimates are made when data are available for at least 50 percent of the population.

    The numbers in 2024

    In 2024, 193 countries have a value. At the top, 16 countries tie at 100 (e.g. Andorra, Australia, Bahrain); the lowest is Ethiopia (10.36). The median country value is 93.93. The World Bank's World aggregate for 2024 is 82.16.

    Highest, 2024

    Ties are listed A to Z.

    #CountryValue
    1Andorra100
    2Australia100
    3Bahrain100
    4Brunei Darussalam100
    5Gibraltar100
    6Isle of Man100
    7Kuwait100
    8Macao SAR, China100
    9Malta100
    10Monaco100

    Lowest, 2024

    #CountryValue
    1Ethiopia10.36
    2Chad13.14
    3Central African Republic14.04
    4South Sudan14.43
    5Madagascar15.37
    6Congo, Dem. Rep.16.3
    7Niger16.34
    8Benin22.25
    9Liberia23.34
    10Papua New Guinea23.57
    How many countries report, by decade
    DecadeMost countries in one year
    2000s210
    2010s213
    2020s202

    World aggregate by year

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

    YearWorld
    202482.16
    202381.55
    202280.45
    202179.35
    202078.28
    201977.17
    201876.03
    201774.87
    201673.79
    201572.61
    201471.42
    201370.24

    By region, 2024

    World Bank regionValue
    North America99.51
    Europe & Central Asia97.44
    East Asia & Pacific94.78
    Latin America & Caribbean 90.34
    Middle East, North Africa, Afghanistan & Pakistan83.66
    South Asia81.96
    Sub-Saharan Africa 37.11

    First rows

    people-using-at-least-basic-sanitation-services-percent-of-population.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200022.298273284655
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200122.3095245309963
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200223.7347094449173
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200325.160116505547
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200426.592743290922
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200528.0329173729232
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200629.4737113537171
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income200730.8753174900848

    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
    valuenumberPeople using at least basic sanitation services (% of population), 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 2024?

    There is a tie: 16 countries share the highest value, 100 (for example Andorra, Australia, Bahrain).

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

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

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("people-using-at-least-basic-sanitation-services-percent-of-population.csv"))

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

    File: people-using-at-least-basic-sanitation-services-percent-of-population.csv

    How many countries report a value for 2024?

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

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

    =COUNTIF(E2:E100000,2024)

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("people-using-at-least-basic-sanitation-services-percent-of-population.csv"))

    (df.year == 2024).sum()

    File: people-using-at-least-basic-sanitation-services-percent-of-population.csv

    What is the median across countries in 2024?

    93.93 (median of the 193 country values; not a World Bank aggregate).

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

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

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

    pandas (df = pd.read_csv("people-using-at-least-basic-sanitation-services-percent-of-population.csv"))

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

    File: people-using-at-least-basic-sanitation-services-percent-of-population.csv

    Which country rose the most between 2014 and 2024?

    Nepal: from 53.39 to 86.03, a rise of 32.63 (out of 192 countries with both years).

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

    Use the wide file (people-using-at-least-basic-sanitation-services-percent-of-population-wide.csv): add a column = [2024] - [2014], 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 = 2014 AND b.year = 2024 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("people-using-at-least-basic-sanitation-services-percent-of-population.csv"))

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

    File: people-using-at-least-basic-sanitation-services-percent-of-population.csv

    Which year has the most countries reporting?

    2016, with 213 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("people-using-at-least-basic-sanitation-services-percent-of-population.csv"))

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

    File: people-using-at-least-basic-sanitation-services-percent-of-population.csv