Skip to content
3D map of Morocco’s population in 2020, north up, one column for each 1 km square as tall as its density: the tallest columns stand over Fez, with Casablanca the next labelled town

World / Africa / Morocco

Morocco’s population density is 219 people per square mile

37,712,505 people on 172,317 sq mi (446,300 km²) · 99th of 193 countries by density · World Bank, 2023

Morocco on a globe

People per sq mi, 2020 per km² on the second row

  1. 10.4
  2. 5019
  3. 25097
  4. 1,000386
  5. 5,0001,931
  6. 25,000+9,653+

The ground: the average within 7 mi (10 km); sand: no one

Where Morocco’s 36,670,237 people lived in 2020: a 3D model with one column for each 0.6 mi (1 km) square that has people, its height and colour set by that square’s density and nothing smoothed (the ground’s paler colour is the average round it), north up. Modeled estimate (JRC), GHS-POP R2023A. Download the map (PNG) Download the figures (CSV)

Morocco has 219 people per square mile (85 per km²): 37,712,505 people on 172,317 sq mi (446,300 km²) of land, the World Bank’s official estimate for 2023. That ranks 99th of 193 countries and 21st of 54 in Africa. The 3D map above shows where those people live, square by square.

By Marko Visic, MPharm, BSc Physics · Updated · How the maps are made

Sheet: Morocco, official estimates 2023
Population37,712,505
Land area172,317 sq mi446,300 km²
Density219 per sq mi85 per km²
Rank by density99th of 19321st of 54 in Africa

Where Morocco’s people live

Morocco’s people live close together on a small part of its land. The JRC’s population grid counts 36,670,237 people in 2020 and places each one on the map above.

0.28%of the land holds half of all residents.
1.6%of the land holds four in five.
82.4%of the land has no modeled residents.
34,569people per sq mi (13,347 per km²) around the average resident, about 158 times the national density. This population-weighted density is the crowding people actually live in.
  • 0.28% of the land: half of all residents
  • 1.3% of the land: the next 30%
  • 16.1% of the land: the last 20%
  • 82.4% of the land: nobody

Modeled estimates for 2020 (JRC GHS-POP R2023A). The shares, the weighted density and the map all count the same 1 km squares.

Cities and towns

The JRC’s 2020 grid finds 71 places in Morocco big and dense enough to count as urban centres. They hold 52.3% of all residents; the table lists the 20 largest. Another 25.6% live in urban clusters, the JRC’s class for towns and suburbs, and 22.1% in rural areas.

Urban centrePeople, 2020Share of Morocco
Casablanca4,275,57211.7%
Rabat1,964,8575.4%
Fez1,315,8093.6%
Tangier1,145,7603.1%
Marrakesh1,071,5072.9%
Agadir841,4182.3%
Meknes702,1071.9%
Oujda565,9541.5%
Kenitra527,8781.4%
Tétouan443,0181.2%
Safi328,5290.9%
Nador247,8500.7%
El Jadida237,0010.6%
Khouribga214,9350.6%
Beni Mellal212,6200.6%
Aït Melloul186,7580.5%
Taza174,6230.5%
Berrechid163,3790.4%
Berkane162,0100.4%
Khemisset161,7760.4%

Modeled estimates (JRC): urban-centre extents and people from GHS-SMOD and GHS-POP 2020, names from GHS-UCDB R2024A. Definitions on the methodology page.

How Morocco’s density changed

Morocco’s density went from 69 to 219 people per sq mi between 1961 and 2023 (27 to 85 per km²), the years the World Bank series covers.

1961: 69 per sq mi2023: 219 per sq mi

People per square mile, official estimates, World Bank. The axis starts at 60.

The JRC’s grid goes back to 1975. It counts 17,314,625 people then and 36,670,237 in 2020,a rise of 111.8%. Over the same years the population’s centre moved 7.4 mi (11.9 km) west-northwest, toward Casablanca.

YearPeopleWeighted density, per sq mi (km²)In urban centres
197517,314,62516,382 (6,325)34.6%
198019,666,96018,998 (7,335)38.0%
198522,322,59121,655 (8,361)40.1%
199024,557,73924,438 (9,436)42.1%
199526,584,91626,872 (10,375)44.6%
200028,538,89728,818 (11,127)45.6%
200530,415,76729,139 (11,251)46.9%
201032,447,86030,575 (11,805)48.9%
201534,662,48032,549 (12,567)50.8%
202036,670,23734,569 (13,347)52.3%

Modeled estimates (JRC GHS-POP and GHS-SMOD R2023A, 1 km grid), 1975–2020. The population centre is the population-weighted mean position (calculated).

Modeled and official counts

Two sources count Morocco’s people on this page. The headline figures are the World Bank’s official estimates. The map and the where-people-live figures come from the JRC’s GHS-POP grid, which spreads census-based counts over the built-up areas it finds in satellite data.

For 2020 the grid’s total is 0.2% above the World Bank’s estimate. We show both as published and never adjust one to match the other.

Why the map looks like this

The coastal plains and plateaus hold three-fourths of Morocco’s people and most of its cities,1 and the map’s columns crowd the Atlantic and Mediterranean side of the country. The Rif and Atlas mountains hold about a fifth of the people, in villages of tightly clustered dwellings, commonly perched on hillsides or hilltops; south of the Atlas, where a tiny share lives, virtually all settlement is in oases.1 On the map most of that land is bare.

Some three-fifths of Moroccans now live in urban areas. Under the French protectorate the focus of political and economic life moved from the imperial cities of the interior, Fez, Meknes and Marrakesh, to the Atlantic coast, and Casablanca grew from a small coastal village into a metropolis.1 Its urban centre is the largest on the grid, with 11.7% of the people; the tallest columns stand in Fez.

Morocco compared

Spain is the most densely populated of Morocco’s neighbours, with 251 people per sq mi, 1.1 times Morocco’s density; Algeria is the least, with 50, while Morocco has 4.4 times that.

CountryPeople per sq miper km²Population
Spain2519748,352,528
Morocco2198537,712,505
Algeria501946,164,219

Official estimates for 2023, World Bank. Morocco and its neighbours, the countries next to it on our 1 km grid of the World Bank’s boundaries (see methodology), densest first.

Farther away, Burkina Faso (218), Moldova (221), Myanmar (215), Romania (215) and Brunei (226) have nearly the same density. In Africa, Morocco ranks 21st of 54 by density, behind leaders Mauritius, Rwanda and Burundi. The full ranking is on the population density by country page.

A US state the same size

California is the US state closest to Morocco in land area: 155,860 sq mi against 172,317. It holds 39,355,309 people (2025 estimate): 253 per sq mi (97 per km²), 1.2 times Morocco’s density. See the California density map.

Using this map

  • Move it, turn it and look closer. Drag the map to move it, right-drag (or drag with Ctrl or ⌘ held) to turn and tilt it, scroll to zoom (scrolling down from the opening view carries on down the page), or use the buttons; on a phone, drag it with one finger, pinch or double-tap to zoom, twist two fingers to turn it and slide two fingers up or down to tilt it (the page scrolls from below the map). The compass button turns north back up. Point at any column to read its density.
  • Read the colours, then the heights. A column’s top takes the legend’s colour for its square, and its height rises in step with density, so a column twice as tall marks a square twice as dense.
  • Use the weighted density for crowding. The national figure of 219 per sq mi spreads people over all of Morocco’s land, empty or not; 34,569 per sq mi is what the average resident lives in.
  • Take the data with you. The CSV lists every figure on this page with its year, label and source, and the PNG is free to reuse with the credit below.

Questions about Morocco’s population density

What is the population density of Morocco?
219 people per square mile (85 per km²), the World Bank’s official estimate for 2023: 37,712,505 people on 172,317 sq mi (446,300 km²) of land. That ranks Morocco 99th of 193 countries.
What US state is closest in size to Morocco?
California, by land area: 155,860 sq mi against Morocco’s 172,317 sq mi. California has 253 people per sq mi (2025); Morocco has 219 (2023).
Where do most people in Morocco live?
Half of the population lives on 0.28% of the land. Morocco’s 71 urban centres, led by Casablanca (4,275,572 people), Rabat (1,964,857) and Fez (1,315,809), hold 52.3% of all residents, and 22.1% live in rural areas (JRC modeled estimates for 2020).
Is Morocco densely populated?
It sits in the middle of Africa’s table, 21st of 54 countries by density. Its neighbours range from Algeria at 50 people per sq mi to Spain at 251.

Data and sources

Data as of: World Bank World Development Indicators (official estimates to 2023); JRC GHS-POP and GHS-SMOD R2023A (modeled estimates, 1975–2020); page figures computed 2026-11-08. Every figure carries its label: official estimate, modeled estimate (JRC) or calculated. Equations and limits are on the methodology page.

  1. World Bank, World Development Indicators: EN.POP.DNST, SP.POP.TOTL, AG.LND.TOTL.K2. CC BY 4.0; retrieved Oct 2026. data.worldbank.org
  2. European Commission, Joint Research Centre (JRC), GHS-POP R2023A, 1 km Mollweide grid, epochs 1975–2020. CC BY 4.0; retrieved Oct 2026. human-settlement.emergency.copernicus.eu
  3. European Commission, Joint Research Centre (JRC), GHS-POP R2023A, 100 m Mollweide grid, epoch 2020 (poster cells under 1 km). CC BY 4.0; retrieved Nov 2026. human-settlement.emergency.copernicus.eu
  4. European Commission, Joint Research Centre (JRC), GHS-SMOD R2023A (Degree of Urbanisation, level 2), 1 km, epochs 1975–2020. CC BY 4.0; retrieved Oct 2026. human-settlement.emergency.copernicus.eu
  5. European Commission, Joint Research Centre (JRC), GHS-UCDB R2024A V1.2 (urban centre names only). CC BY 4.0 (JRC FTP copyright notice); retrieved Oct 2026. human-settlement.emergency.copernicus.eu
  6. GeoNames, GeoNames cities5000 (town names and points only). CC BY 4.0; retrieved Nov 2026. www.geonames.org
  7. World Bank, World Bank Official Boundaries, version 3 (Admin 0, Non-Determined Legal Status Areas, Admin 0 lines). CC BY 4.0; retrieved Oct 2026. datacatalog.worldbank.org
  8. U.S. Census Bureau, Gazetteer Files, counties: 2020 and 2025 (state land area = sum of county ALAND). public domain (17 U.S.C. §105); retrieved Oct 2026. www.census.gov
  9. U.S. Census Bureau, Vintage 2025 state population estimates (NST-EST2025-ALLDATA), July 1, 2025. public domain (17 U.S.C. §105); retrieved Oct 2026. www.census.gov
  10. GHSL dataset doi:10.2905/2FF68A52-5B5B-4A22-8F40-C41DA8332CFE; Pesaresi et al. (2024), doi:10.1080/17538947.2024.2390454.

Sources for “Why the map looks like this”

  1. Encyclopaedia Britannica, “Morocco: Settlement patterns”, with the sections on urban settlement and demographic trends. www.britannica.com

Map and CSV: free to reuse under CC BY 4.0 with the credit “populationdensitymaps.com; data: World Bank, European Commission JRC”.