DataBrighten

    Armed forces personnel, total

    5,355 × 6rows × columns: 174 countries, 1985 to 2020

    Real data: World Bank, World Development Indicators, indicator MS.MIL.TOTL.P1, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows5,355country-year values
    Countries174with at least one value
    Years1985 – 202033 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    Armed forces personnel are active duty military personnel, including paramilitary forces if the training, organization, equipment, and control suggest they may be used to support or replace regular military forces.

    Limits and exceptions (World Bank note)

    Data excludes personnel not on active duty, therefore it underestimates the share of the labor force working for the defense establishment. The cooperation of governments of all countries listed in “The Military Balance” has been sought by IISS and, in many cases, received. However, some data in “The Military Balance” is estimated.

    The numbers in 2020

    In 2020, 170 countries have a value. The highest is India (3.07 million); at the bottom, 5 countries tie at 0 (e.g. Antigua and Barbuda, Iceland, Libya). The median country value is 33,000. The World Bank's World aggregate for 2020 is 27.41 million.

    Top 10 countries, 2020

    value

    Source: World Bank, MS.MIL.TOTL.P1, retrieved 19 November 2026. Computed from armed-forces-personnel-total.csv.

    Highest, 2020

    #CountryValue
    1India3.07 million
    2China2.54 million
    3Korea, Dem. People's Rep.1.47 million
    4Russian Federation1.45 million
    5United States1.40 million
    6Pakistan943,000
    7Egypt, Arab Rep.836,000
    8Brazil762,000
    9Indonesia676,000
    10Iran, Islamic Rep.650,000

    Lowest, 2020

    Ties are listed A to Z.

    #CountryValue
    1West Bank and Gaza0
    2Seychelles0
    3Libya0
    4Iceland0
    5Antigua and Barbuda0
    6Luxembourg1,000
    7Haiti1,000
    8Equatorial Guinea1,000
    9Cabo Verde1,000
    10Barbados1,000
    How many countries report, by decade
    DecadeMost countries in one year
    1980s141
    1990s170
    2000s168
    2010s169
    2020s170

    World aggregate by year

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

    YearWorld
    202027.41 million
    201927.67 million
    201827.65 million
    201727.41 million
    201627.54 million
    201527.44 million
    201427.31 million
    201327.21 million
    201228.15 million
    201128.02 million
    201028.13 million
    200927.92 million

    By region, 2020

    World Bank regionValue
    East Asia & Pacific7.91 million
    Europe & Central Asia5.00 million
    Middle East, North Africa, Afghanistan & Pakistan4.83 million
    South Asia3.72 million
    Latin America & Caribbean 2.74 million
    Sub-Saharan Africa 1.73 million
    North America1.47 million

    First rows

    armed-forces-personnel-total.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198547000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198955000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199058000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199145000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199245000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199345000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199445000
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income1995383000

    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
    valuenumberArmed forces personnel, total, 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?

    India, with 3.07 million.

    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("armed-forces-personnel-total.csv"))

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

    File: armed-forces-personnel-total.csv

    How many countries report a value for 2020?

    170 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("armed-forces-personnel-total.csv"))

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

    File: armed-forces-personnel-total.csv

    What is the median across countries in 2020?

    33,000 (median of the 170 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("armed-forces-personnel-total.csv"))

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

    File: armed-forces-personnel-total.csv

    Which country rose the most between 2010 and 2020?

    India: from 2.63 million to 3.07 million, a rise of 442,414 (out of 168 countries with both years).

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

    Use the wide file (armed-forces-personnel-total-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("armed-forces-personnel-total.csv"))

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

    File: armed-forces-personnel-total.csv

    Which year has the most countries reporting?

    2020, with 170 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("armed-forces-personnel-total.csv"))

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

    File: armed-forces-personnel-total.csv