As of June 2026, the population of Morocco is 38.9 million. The number of inhabitants has increased by 344 thousand in the last year, representing a growth of 0.90%. The median age of the population has increased in recent years, rising from 26.9 years in 2016 to 30.1 years in 2026. Currently, life expectancy at birth is 75.9 years and population density is 87.2 inhabitants per square kilometer.
The population growth rate of Morocco peaked in 1957, reaching around 2.82% annually, but has since declined to approximately 0.88% in 2026. The annual increase in the number of people has also decreased from a peak of around 542.61 thousand in 1982 to nearly 343.79 thousand in 2026.
In Morocco, life expectancy at birth has been increasing, with the indicator rising from 69.1 years in 2006 to 75.9 years in 2026, representing an increase of almost 7 years over the past 2 decades.
Morocco has several cities considered medium-sized by their number of inhabitants, but there are also some large ones. The most populous city is Casablanca, Casablanca-Settat, con una diferencia significativa sobre las demás, alcanzando approximately 3.7 million inhabitants. It is followed by Rabat, Rabat-Salé-Kénitra with 1.7 million and Fes, Fes-Meknes with 1.2 million.
These are the 20 most populous cities in Morocco:
| # | City | Population |
|---|---|---|
| 1 | Casablanca, Casablanca-Settat | 3,665,954 |
| 2 | Rabat, Rabat-Salé-Kénitra | 1,655,753 |
| 3 | Fes, Fes-Meknes | 1,191,905 |
| 4 | Tangier, Tanger-Tetouan-Al Hoceima | 1,035,141 |
| 5 | Marrakesh, Marrakesh-Safi | 995,871 |
| 6 | Salé, Rabat-Salé-Kénitra | 972,299 |
| 7 | Agadir, Souss-Massa | 698,310 |
| 8 | Meknes, Fes-Meknes | 568,295 |
| 9 | Oujda, Oriental | 539,711 |
| 10 | Kenitra, Rabat-Salé-Kénitra | 470,949 |
| # | City | Population |
|---|---|---|
| 11 | Tétouan, Tanger-Tetouan-Al Hoceima | 415,810 |
| 12 | Al Hoceïma, Tanger-Tetouan-Al Hoceima | 395,644 |
| 13 | Temara, Rabat-Salé-Kénitra | 342,345 |
| 14 | Safi, Marrakesh-Safi | 336,883 |
| 15 | Mohammedia, Casablanca-Settat | 227,799 |
| 16 | Khouribga, Beni Mellal-Khenifra | 214,241 |
| 17 | El Jadida, Casablanca-Settat | 212,863 |
| 18 | Beni Mellal, Beni Mellal-Khenifra | 210,397 |
| 19 | Salé Al Jadida, Rabat-Salé-Kénitra | 200,000 |
| 20 | Ait Melloul, Souss-Massa | 187,652 |