Skip to content

Population in Costa Rica compared to Morocco: Trends, Charts, Rankings

Updated on by Georank team

The latest officially reported population of Costa Rica was 5,129,910 in 2024 vs 38,081,173 people in Morocco in 2024. In 2026, based on the adjusted UN estimation, the current Costa Rica's population is 5,181,862 people compared to 38,871,720 in Morocco.

Population statistics:

  • Morocco's population is 7.5 times bigger than Costa Rica's.
  • Costa Rica is ranked the 126th most populous country in the world, while Morocco is the 41st.
  • The countries together account for 0.53% of the world: 0.06% for Costa Rica vs 0.47% for Morocco.
  • For the last 10 years, Costa Rica has had an average growth rate of +0.77% per year vs +1.09% in Morocco.
  • Since 2006, the population of Costa Rica has increased from 4.32M people to 5.18M (19.9% growth), while Morocco has grown from 30.8M to 38.9M (26.3% growth).

Costa Rica vs Morocco: population by year and forecast

Costa Rica
Factual

Projection
Morocco
Factual

Projection
1x
Year Population
Costa Rica Morocco
2100 3,804,183 38,181,184
2099 3,842,423 38,411,679
2098 3,880,999 38,639,306
2097 3,919,996 38,863,211
2096 3,959,352 39,084,772
2095 3,999,084 39,302,453
2094 4,039,053 39,515,556
2093 4,079,349 39,726,709
2092 4,119,898 39,934,218
2091 4,160,663 40,138,565
2090 4,201,548 40,337,690
2089 4,242,452 40,532,151
2088 4,283,327 40,718,654
2087 4,324,225 40,902,624
2086 4,364,979 41,085,174
2085 4,405,520 41,264,970
2084 4,445,770 41,438,801
2083 4,485,644 41,604,865
2082 4,525,171 41,768,393
2081 4,564,265 41,927,610
2080 4,602,737 42,082,087
2079 4,640,677 42,233,228
2078 4,677,935 42,377,404
2077 4,714,527 42,515,702
2076 4,750,309 42,648,054
2075 4,785,359 42,775,325
2074 4,819,691 42,898,811
2073 4,853,137 43,017,234
2072 4,885,727 43,128,932
2071 4,917,445 43,232,517
2070 4,948,313 43,332,679
2069 4,978,425 43,423,419
2068 5,007,604 43,507,485
2067 5,035,877 43,586,077
2066 5,063,521 43,654,657
2065 5,090,474 43,723,648
2064 5,116,546 43,781,054
2063 5,141,922 43,828,593
2062 5,166,260 43,871,197
2061 5,189,836 43,902,710
2060 5,212,549 43,927,001
2059 5,234,066 43,942,510
2058 5,254,528 43,944,996
2057 5,273,844 43,939,695
2056 5,292,013 43,927,624
2055 5,308,829 43,902,661
2054 5,324,305 43,866,486
2053 5,338,417 43,819,100
2052 5,350,974 43,759,239
2051 5,361,865 43,688,144
2050 5,371,197 43,605,074
2049 5,378,904 43,517,919
2048 5,385,081 43,417,554
2047 5,389,678 43,308,462
2046 5,392,713 43,192,511
2045 5,394,209 43,065,569
2044 5,394,124 42,925,634
2043 5,392,590 42,780,215
2042 5,389,628 42,623,872
2041 5,385,101 42,456,113
2040 5,379,344 42,280,578
2039 5,372,186 42,098,906
2038 5,363,617 41,902,451
2037 5,353,928 41,700,541
2036 5,343,027 41,488,891
2035 5,330,994 41,266,216
2034 5,317,895 41,037,058
2033 5,303,634 40,795,454
2032 5,288,416 40,544,755
2031 5,272,215 40,280,535
2030 5,255,064 40,005,642
2029 5,236,901 39,720,087
2028 5,217,724 39,422,016
2027 5,197,413 39,109,148
2026 5,176,096 38,783,685
2025 5,153,634 38,442,658
2024 5,129,910 38,081,173
2023 5,105,525 37,712,505
2022 5,081,765 37,329,064
2021 5,059,988 36,954,442
2020 5,034,320 36,584,208
2019 4,999,553 36,210,898
2018 4,957,818 35,839,760
2017 4,913,177 35,446,392
2016 4,866,998 35,023,457
2015 4,818,038 34,607,588
2014 4,767,119 34,204,780
2013 4,716,147 33,787,571
2012 4,663,934 33,355,241
2011 4,609,833 32,912,588
2010 4,555,962 32,467,016
2009 4,499,791 32,030,778
2008 4,440,056 31,606,767
2007 4,380,248 31,186,468
2006 4,321,340 30,771,178
2005 4,261,240 30,358,144
2004 4,200,078 29,953,018
2003 4,138,784 29,571,415
2002 4,075,705 29,198,142
2001 4,008,947 28,814,643
2000 3,937,739 28,423,435
1999 3,862,101 28,027,179
1998 3,782,838 27,621,648
1997 3,701,711 27,213,337
1996 3,619,013 26,808,107
1995 3,535,176 26,399,429
1994 3,451,122 26,000,822
1993 3,367,434 25,614,586
1992 3,284,258 25,212,468
1991 3,202,176 24,799,014
1990 3,121,706 24,375,551
1989 3,043,827 23,939,414
1988 2,968,103 23,500,524
1987 2,892,699 23,054,392
1986 2,817,216 22,600,803
1985 2,741,894 22,113,953
1984 2,667,595 21,593,778
1983 2,595,153 21,060,696
1982 2,524,806 20,520,318
1981 2,456,637 19,985,401
1980 2,390,633 19,459,943
1979 2,326,490 18,955,589
1978 2,264,510 18,477,385
1977 2,205,025 18,014,756
1976 2,147,774 17,574,182
1975 2,092,719 17,150,786
1974 2,039,643 16,733,842
1973 1,988,343 16,326,269
1972 1,938,248 15,924,692
1971 1,888,539 15,527,225
1970 1,838,949 15,129,449
1969 1,789,276 14,734,255
1968 1,739,731 14,347,899
1967 1,689,523 13,968,175
1966 1,638,116 13,597,065
1965 1,586,208 13,239,171
1964 1,533,960 12,898,886
1963 1,481,604 12,577,502
1962 1,429,445 12,253,092
1961 1,377,920 11,931,085
1960 1,327,496 11,624,933

Data sources: United Nations | World Population Prospects (2025–2100, retrieved 2026-03-10); World Bank | Health (1960–2024, retrieved 2026-04-06).

GeoRank.org/population/costa-rica/morocco | CC BY

From 2006 to 2016, the population of Costa Rica increased by 545,658 people (a 12.6% growth), while Morocco gained 4,252,279 people (a 13.8% growth).

For the next 10 years, from 2016 to 2026, Costa Rica gained 314,864 people (a 6.47% growth), while Morocco's population increased by 3,848,263 people (a 11% growth).

Costa Rica was ranked 119th most populous country in 2006 and is 126th in 2026. Morocco was ranked 37th in 2006 and ranked 41st now.

The UN's World Population Prospects forecasts that in 24 years (in 2050) Costa Rica's population will grow by 3.65% to 5,371,197 people and will still be ranked 126th. The population of Morocco will increase by 12.2% to 43,605,074 people and rank change from 41st to 50th.

Costa Rica is projected to reach its peak in 2045 at 5.39M people compared to the peak of 43.9M people in 2058 for Morocco.

Population growth rate by year

Costa Rica
Factual

Projection
Morocco
Factual

Projection
1x
Year Growth rate
Costa Rica Morocco
2100 -1% -0.6%
2099 -0.99% -0.59%
2098 -0.99% -0.58%
2097 -0.99% -0.57%
2096 -0.99% -0.55%
2095 -0.99% -0.54%
2094 -0.99% -0.53%
2093 -0.98% -0.52%
2092 -0.98% -0.51%
2091 -0.97% -0.49%
2090 -0.96% -0.48%
2089 -0.95% -0.46%
2088 -0.95% -0.45%
2087 -0.93% -0.44%
2086 -0.92% -0.44%
2085 -0.91% -0.42%
2084 -0.89% -0.4%
2083 -0.87% -0.39%
2082 -0.86% -0.38%
2081 -0.84% -0.37%
2080 -0.82% -0.36%
2079 -0.8% -0.34%
2078 -0.78% -0.33%
2077 -0.75% -0.31%
2076 -0.73% -0.3%
2075 -0.71% -0.29%
2074 -0.69% -0.28%
2073 -0.67% -0.26%
2072 -0.65% -0.24%
2071 -0.62% -0.23%
2070 -0.6% -0.21%
2069 -0.58% -0.19%
2068 -0.56% -0.18%
2067 -0.55% -0.16%
2066 -0.53% -0.16%
2065 -0.51% -0.13%
2064 -0.49% -0.11%
2063 -0.47% -0.1%
2062 -0.45% -0.07%
2061 -0.44% -0.06%
2060 -0.41% -0.04%
2059 -0.39% -0.006%
2058 -0.37% 0.01%
2057 -0.34% 0.03%
2056 -0.32% 0.06%
2055 -0.29% 0.08%
2054 -0.26% 0.11%
2053 -0.23% 0.14%
2052 -0.2% 0.16%
2051 -0.17% 0.19%
2050 -0.14% 0.2%
2049 -0.11% 0.23%
2048 -0.09% 0.25%
2047 -0.06% 0.27%
2046 -0.03% 0.29%
2045 0.002% 0.33%
2044 0.03% 0.34%
2043 0.05% 0.37%
2042 0.08% 0.4%
2041 0.11% 0.42%
2040 0.13% 0.43%
2039 0.16% 0.47%
2038 0.18% 0.48%
2037 0.2% 0.51%
2036 0.23% 0.54%
2035 0.25% 0.56%
2034 0.27% 0.59%
2033 0.29% 0.62%
2032 0.31% 0.66%
2031 0.33% 0.69%
2030 0.35% 0.72%
2029 0.37% 0.76%
2028 0.39% 0.8%
2027 0.41% 0.84%
2026 0.44% 0.89%
2025 0.46% 0.95%
2024 0.48% 0.98%
2023 0.47% 1.03%
2022 0.43% 1.01%
2021 0.51% 1.01%
2020 0.7% 1.03%
2019 0.84% 1.04%
2018 0.91% 1.11%
2017 0.95% 1.21%
2016 1.02% 1.2%
2015 1.07% 1.18%
2014 1.08% 1.23%
2013 1.12% 1.3%
2012 1.17% 1.34%
2011 1.18% 1.37%
2010 1.25% 1.36%
2009 1.35% 1.34%
2008 1.37% 1.35%
2007 1.36% 1.35%
2006 1.41% 1.36%
2005 1.46% 1.35%
2004 1.48% 1.29%
2003 1.55% 1.28%
2002 1.67% 1.33%
2001 1.81% 1.38%
2000 1.96% 1.41%
1999 2.1% 1.47%
1998 2.19% 1.5%
1997 2.29% 1.51%
1996 2.37% 1.55%
1995 2.44% 1.53%
1994 2.49% 1.51%
1993 2.53% 1.59%
1992 2.56% 1.67%
1991 2.58% 1.74%
1990 2.56% 1.82%
1989 2.55% 1.87%
1988 2.61% 1.94%
1987 2.68% 2.01%
1986 2.75% 2.2%
1985 2.79% 2.41%
1984 2.79% 2.53%
1983 2.79% 2.63%
1982 2.77% 2.68%
1981 2.76% 2.7%
1980 2.76% 2.66%
1979 2.74% 2.59%
1978 2.7% 2.57%
1977 2.67% 2.51%
1976 2.63% 2.47%
1975 2.6% 2.49%
1974 2.58% 2.5%
1973 2.58% 2.52%
1972 2.63% 2.56%
1971 2.7% 2.63%
1970 2.78% 2.68%
1969 2.85% 2.69%
1968 2.97% 2.72%
1967 3.14% 2.73%
1966 3.27% 2.7%
1965 3.41% 2.64%
1964 3.53% 2.56%
1963 3.65% 2.65%
1962 3.74% 2.7%
1961 3.8% 2.63%

Data sources: United Nations | World Population Prospects (2025–2100, retrieved 2026-03-10); World Bank | Health (1961–2024, retrieved 2026-04-06).

GeoRank.org/population/costa-rica/morocco | CC BY

In 2024, the population of Costa Rica grew by 0.48%, while Morocco's population grew by 0.98%.

Live population counters

Costa Rica Morocco
Current population
5181862
38871720
Population rank 126/197 41/197
Percent of world population 0.06% 0.47%
One net population change
21.6 minutes
1.43 minutes
One birth every
10.1 minutes
50.1 seconds
One death every
18.9 minutes
2.47 minutes
Daily growth/decline +67 +1,010
Annual growth/decline +24,385 +368,668
Annual growth/decline rate +0.48% +0.98%
Population growth rate rank 138/197 104/197
One migration net change every
8.78 hours
9.37 minutes
Annual migration change +1,000 -56,254
Net migration rank 63/196 176/196
Foreign-born residents 628,404 111,069
Foreign-born residents rank 75/195 129/195
Foreign-born share of population 12.2% 0.3%
Foreign-born share rank 55/195 182/195

Natural population change vs migration

Costa Rica
Natural

Migration
Morocco
Natural

Migration
1x
Year Population change
Costa Rica Morocco
Natural Migration Natural Migration
2025 - 1,000 - -56,254
2024 - 967 - -46,802
2023 24,109 995 417,213 -39,650
2022 21,409 1,006 427,903 -38,594
2021 20,119 1,018 407,829 -47,902
2020 29,164 1,029 415,999 -35,474
2019 37,682 1,653 457,307 -91,217
2018 42,469 1,673 464,375 -88,159
2017 43,471 1,671 471,011 -60,472
2016 45,565 1,649 474,637 -39,302
2015 49,077 1,617 477,654 -81,248
2014 49,559 1,589 481,295 -72,065
2013 49,227 1,579 492,284 -67,096
2012 52,036 1,587 504,698 -65,251
2011 52,884 1,695 513,305 -67,447
2010 50,803 2,357 515,804 -70,510
2009 55,757 3,432 509,386 -82,203
2008 56,491 3,794 499,766 -78,912
2007 55,244 4,080 493,526 -73,759
2006 54,177 4,321 483,200 -72,364
2005 57,139 4,567 474,285 -59,024
2004 55,769 4,856 461,756 -66,749
2003 56,743 5,216 452,650 -84,460
2002 58,388 5,812 446,147 -67,802
2001 62,199 7,119 452,621 -63,967
2000 64,268 8,826 461,341 -67,569
1999 64,922 13,253 473,071 -74,343
1998 64,788 15,556 492,604 -80,286
1997 64,954 16,954 500,807 -96,502
1996 66,094 17,393 501,499 -95,331
1995 67,585 16,609 496,573 -85,386
1994 68,336 15,587 501,426 -115,404
1993 69,016 14,431 507,707 -121,254
1992 69,830 13,069 525,680 -107,911
1991 70,506 10,757 539,850 -130,717
1990 71,727 7,949 535,506 -97,711
1989 72,327 3,758 538,996 -104,509
1988 72,944 2,414 545,800 -102,484
1987 73,188 2,267 553,005 -104,029
1986 73,211 2,302 558,105 -99,905
1985 72,776 2,357 560,810 -45,336
1984 71,062 2,402 564,159 -39,319
1983 68,972 2,449 566,301 -24,988
1982 66,826 2,453 564,904 -25,471
1981 64,632 2,431 552,936 -22,553
1980 62,561 2,387 534,448 -13,899
1979 60,984 2,349 515,554 -27,374
1978 58,327 2,296 498,834 -30,600
1977 56,122 2,228 489,173 -32,161
1976 54,019 2,129 482,130 -58,019
1975 51,979 1,992 474,631 -51,968
1974 50,349 1,839 464,147 -52,927
1973 48,943 1,468 455,699 -51,772
1972 48,417 1,366 446,449 -47,226
1971 48,341 1,296 435,104 -39,385
1970 48,398 1,137 426,015 -26,168
1969 48,790 1,017 414,931 -24,389
1968 48,361 939 407,437 -25,267
1967 50,193 926 400,594 -23,309
1966 50,755 930 391,881 -26,945
1965 51,196 932 383,989 -33,139
1964 51,435 934 375,835 -46,106
1963 51,403 938 369,250 -56,214
1962 51,046 934 363,843 -28,071
1961 50,149 924 348,650 -40,413
1960 48,857 910 323,499 -19,434

Data sources: World Bank | Health (1960–2025, retrieved 2026-04-06).

GeoRank.org/population/costa-rica/morocco | CC BY

Over the last 10 years, 96.3% of the population change in Costa Rica is from natural causes (a gain of 362,624 people) and 3.69% is from migration (a gain of 13,900 people). In Morocco 88.3% is from natural causes (a gain of 4,495,223 people) and 11.7% is from migration (a loss of 594,083 people).

As of 2024, 628,404 residents or 12.2% of the population were not native-born in Costa Rica, compared to 111,069 people or 0.3% in Morocco.

Biggest cities by population

Costa Rica
City Population
San Jose 335K
Limon 71.5K
Liberia 65.9K
Alajuela 44.4K
Puntarenas 41.5K
Cartago 22.8K
Heredia 16.7K
Tamarindo 7.13K
Santa Teresa 3K
Morocco
City Population
Casablanca 3.22M
Tangier 1.28M
Fez 1.17M
Marrakesh 1M
Sale 945K
Meknes 601K
Rabat 573K
Agadir 538K
Kenitra 508K
Oujda 506K

Compare countries by 7 more topics

Population map with other countries

1x

Data sources: World Bank | Health (1960–2024, retrieved 2026-04-06); United Nations | World Population Prospects (1960–2026, retrieved 2026-03-10); U.S. Census Bureau (1960–2025, retrieved 2026-02-08); Central Intelligence Agency (CIA) (2000–2019, retrieved 2026-02-20).

GeoRank.org/population/costa-rica/morocco | CC BY

Help us show the world through your eyes

Share a photo of your city and help others discover what it looks like to live there. Your contribution makes our data come alive.

Data sources:

  1. World Bank | Health (1960–2025, retrieved 2026-04-06)
  2. United Nations | World Population Prospects (1960–2100, retrieved 2026-03-10)
  3. U.S. Census Bureau (1960–2025, retrieved 2026-02-08)
  4. Central Intelligence Agency (CIA) (2000–2019, retrieved 2026-02-20)
  5. Wikidata (2026, retrieved 2026-02-08)

Creative Commons Attribution (CC BY) — you’re free to copy, share, remix, adapt, and use even commercially as long as you give appropriate credit and clearly indicate if you made changes. Other sources may be subject to different license terms.