Skip to content

Costa Rica vs Morocco statistics compared

Updated on by Georank team

Costa Rica has a population of 5.13M (ranked 126/197), compared with 38.1M in Morocco (ranked 39/197). Costa Rica's land area is 19,714 sq mi versus 172,317 sq mi for Morocco (ranked 126th vs. 55th).

By GDP, Costa Rica ranks 73/197 ($95.4B) and Morocco ranks 58/197 ($161B). By GDP per capita, Costa Rica ranks 62/197 ($18,587), while Morocco ranks 127/197 ($4,218).

Main facts and rankings

Costa Rica Morocco
Population
5181862
38871720
Population rank 126/197 41/197
GDP
$95.4B
2024
$161B
2024
GDP rank 73/197 58/197
GDP per capita
$18,587
2024
$4,218
2024
GDP per capita rank 62/197 127/197
GDP per capita, PPP
$31,107
2024
$10,415
2024
Government debt
$57B
2024
$109B
2024
Debt-to-GDP ratio
59.8%
2024
67.7%
2024
Government debt per person
$11,106
2024
$2,857
2024
Government debt per person rank 50/185 104/185
Average annual personal income after taxes
$12,150
2026
$5,678
2026
Land area 19,714 sq mi 172,317 sq mi
Population density
262.6 ppl/mi²
2026
225.1 ppl/mi²
2026
Fertility rate
1.33
2023
2.23
2023
Median age
35.6 years
2024
30.5 years
2024
Life expectancy
81.4 years
2026
75.9 years
2026

Costa Rica and Morocco: Comparison Charts

Costa Rica and Morocco economies compared

GDP
Costa Rica

Morocco
1x
Year GDP
Costa Rica Morocco
2024 $95,350,423,177 $160,610,994,055
2023 $86,497,941,439 $146,036,093,667
2022 $69,243,626,029 $131,245,312,804
2021 $64,960,725,734 $142,022,058,447
2020 $62,395,610,760 $121,353,645,057
2019 $64,417,670,521 $128,920,266,409
2018 $62,420,164,992 $127,341,147,582
2017 $60,516,044,657 $118,540,573,368
2016 $58,847,019,610 $111,572,947,005
2015 $56,441,920,821 $110,413,823,842
2014 $52,016,408,854 $119,130,841,412
2013 $50,949,668,842 $115,739,287,305
2012 $47,231,655,432 $106,937,392,311
2011 $42,762,613,699 $110,080,631,332
2010 $37,658,616,952 $100,865,329,473
2009 $30,745,714,313 $101,154,952,241
2008 $30,801,745,700 $101,822,906,949
2007 $26,884,700,709 $86,947,913,287
2006 $22,715,540,324 $75,883,823,301
2005 $20,040,642,477 $68,852,658,069
2004 $18,610,594,846 $66,114,145,451
2003 $17,271,760,507 $58,029,363,354
2002 $16,578,820,687 $47,077,192,188
2001 $15,976,174,337 $43,831,480,208
2000 $15,013,629,662 $43,017,455,402
1999 $14,254,866,285 $46,266,428,648
1998 $13,684,255,947 $46,497,608,725
1997 $12,614,602,382 $39,147,844,526
1996 $11,678,424,507 $43,161,571,528
1995 $11,578,594,260 $39,030,285,468
1994 $10,489,903,725 $35,604,137,423
1993 $9,564,815,975 $31,655,473,664
1992 $8,579,754,758 $33,711,069,431
1991 $7,215,725,487 $32,285,573,574
1990 $5,711,687,787 $30,179,954,775
1989 $5,251,025,767 $26,314,313,191
1988 $4,614,629,898 $25,705,296,184
1987 $4,532,952,047 $21,765,195,948
1986 $4,418,983,871 $19,462,085,540
1985 $3,919,203,960 $14,991,283,216
1984 $3,660,477,856 $14,824,667,954
1983 $3,146,772,631 $16,251,408,128
1982 $2,606,623,555 $17,692,276,734
1981 $2,623,803,096 $17,788,185,479
1980 $4,831,447,001 $21,728,516,153
1979 $4,035,519,323 $15,911,994,817
1978 $3,523,208,810 $13,236,946,234
1977 $3,072,427,013 $11,049,783,872
1976 $2,412,555,426 $9,584,297,284
1975 $1,960,863,466 $8,984,853,005
1974 $1,666,544,754 $7,675,466,449
1973 $1,528,925,846 $6,242,145,880
1972 $1,238,251,696 $5,074,117,545
1971 $1,077,147,538 $4,356,669,034
1970 $984,830,158 $3,956,336,244
1969 $853,630,204 $3,651,622,669
1968 $773,841,494 $3,271,422,333
1967 $699,456,619 $3,046,345,314
1966 $647,305,630 $2,876,401,297
1965 $592,981,162 $2,948,331,090
1964 $542,578,367 $2,798,345,299
1963 $511,902,137 $2,657,252,578
1962 $479,180,824 $2,379,611,125
1961 $490,325,182 $2,025,693,540
1960 $507,513,830 $2,037,154,742

Data sources: World Bank | Economy & Growth (1960–2024, retrieved 2026-04-06).

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

Costa Rica and Morocco economies compared

GDP per capita
Costa Rica

Morocco
1x
Year GDP per capita
Costa Rica Morocco
2024 $18,587 $4,218
2023 $16,942 $3,872
2022 $13,626 $3,516
2021 $12,838 $3,843
2020 $12,394 $3,317
2019 $12,885 $3,560
2018 $12,590 $3,553
2017 $12,317 $3,344
2016 $12,091 $3,186
2015 $11,715 $3,190
2014 $10,911 $3,483
2013 $10,803 $3,425
2012 $10,127 $3,206
2011 $9,276 $3,345
2010 $8,266 $3,107
2009 $6,833 $3,158
2008 $6,937 $3,222
2007 $6,138 $2,788
2006 $5,257 $2,466
2005 $4,703 $2,268
2004 $4,431 $2,207
2003 $4,173 $1,962
2002 $4,068 $1,612
2001 $3,985 $1,521
2000 $3,813 $1,513
1999 $3,691 $1,651
1998 $3,617 $1,683
1997 $3,408 $1,439
1996 $3,227 $1,610
1995 $3,275 $1,478
1994 $3,040 $1,369
1993 $2,840 $1,236
1992 $2,612 $1,337
1991 $2,253 $1,302
1990 $1,830 $1,238
1989 $1,725 $1,099
1988 $1,555 $1,094
1987 $1,567 $944
1986 $1,569 $861
1985 $1,429 $678
1984 $1,372 $687
1983 $1,213 $772
1982 $1,032 $862
1981 $1,068 $890
1980 $2,021 $1,117
1979 $1,735 $839
1978 $1,556 $716
1977 $1,393 $613
1976 $1,123 $545
1975 $937 $524
1974 $817 $459
1973 $769 $382
1972 $639 $319
1971 $570 $280.6
1970 $536 $261.5
1969 $477 $247.8
1968 $445 $228
1967 $414 $218.1
1966 $395 $211.5
1965 $374 $222.7
1964 $354 $216.9
1963 $346 $211.3
1962 $335 $194.2
1961 $356 $169.8
1960 $382 $175.2

Data sources: World Bank | Economy & Growth (1960–2024, retrieved 2026-04-06).

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

Costa Rica vs. Morocco life expectancy calculator

Life expectancy
Costa Rica

Morocco
1x
Year Life expectancy, years
Costa Rica Morocco
2026 81.4 75.9
2025 81.2 75.7
2024 81 75.5
2023 80.8 75.3
2022 79.3 75.2
2021 78.1 73.4
2020 79.7 73.1
2019 80.3 74.2
2018 80.1 73.9
2017 80 73.6
2016 80 73.2
2015 80.4 72.9
2014 80.2 72.5
2013 80.2 72.1
2012 79.9 71.7
2011 79.6 71.3
2010 79.4 70.8
2009 79.4 70.5
2008 79.2 70.1
2007 79.1 69.6
2006 79 69.2
2005 78.9 68.7
2004 78.5 68.3
2003 78.2 68
2002 77.9 67.6
2001 77.6 67.2
2000 77.3 66.8
1999 77.1 66.4
1998 76.9 66
1997 76.6 65.6
1996 76.4 65.2
1995 76.4 64.7
1994 76.3 64.3
1993 76.3 63.9
1992 76.4 63.4
1991 76.2 62.9
1990 76.1 62.4
1989 75.9 61.8
1988 75.5 61.2
1987 75.2 60.6
1986 74.9 60
1985 74.8 59.2
1984 74.6 58.4
1983 74.2 57.7
1982 73.9 56.9
1981 73.4 56
1980 73 55.2
1979 72.5 54.4
1978 72 53.6
1977 71.5 52.8
1976 70.9 52
1975 70.3 51.4
1974 69.4 50.8
1973 68.7 50.2
1972 68 49.7
1971 67.4 49.2
1970 66.8 48.7
1969 66.4 48.2
1968 65.8 47.7
1967 65.6 47.1
1966 65.1 46.5
1965 64.8 45.9
1964 64.5 45.3
1963 64.3 44.8
1962 64.2 44.2
1961 63.9 43.7
1960 63.5 41.7
1959 62.9 42.7
1958 62.3 42.2
1957 61.6 41.7
1956 61.2 41.2
1955 60.5 40.8
1954 59.9 40.4
1953 59.1 40
1952 58.1 39.6
1951 57.8 39.1
1950 57.5 38.8

Data sources: United Nations | World Population Prospects (1950–2026, retrieved 2026-03-10).

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

Costa Rica and Morocco population clocks and comparison

Population
Costa Rica

Morocco
1x
Year Population
Costa Rica Morocco
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: World Bank | Health (1960–2024, retrieved 2026-04-06).

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

Fertility rates in Costa Rica and Morocco

Fertility rate
Costa Rica

Morocco
1x
Year Fertility rate
Costa Rica Morocco
2023 1.33 2.23
2022 1.34 2.26
2021 1.35 2.29
2020 1.45 2.32
2019 1.6 2.34
2018 1.71 2.35
2017 1.71 2.38
2016 1.75 2.4
2015 1.8 2.41
2014 1.8 2.42
2013 1.78 2.48
2012 1.85 2.54
2011 1.88 2.6
2010 1.83 2.63
2009 1.95 2.62
2008 1.98 2.61
2007 1.95 2.62
2006 1.94 2.61
2005 2.04 2.61
2004 2.03 2.61
2003 2.08 2.61
2002 2.16 2.62
2001 2.31 2.69
2000 2.41 2.77
1999 2.48 2.88
1998 2.53 3.04
1997 2.59 3.15
1996 2.68 3.23
1995 2.78 3.3
1994 2.86 3.41
1993 2.93 3.55
1992 3 3.76
1991 3.08 3.95
1990 3.17 4.06
1989 3.24 4.22
1988 3.31 4.39
1987 3.38 4.58
1986 3.45 4.77
1985 3.51 4.99
1984 3.52 5.2
1983 3.53 5.41
1982 3.54 5.6
1981 3.56 5.71
1980 3.58 5.78
1979 3.65 5.85
1978 3.66 5.91
1977 3.7 6.04
1976 3.75 6.18
1975 3.8 6.3
1974 3.89 6.4
1973 3.99 6.48
1972 4.16 6.55
1971 4.36 6.62
1970 4.59 6.68
1969 4.84 6.73
1968 5.03 6.79
1967 5.42 6.85
1966 5.7 6.89
1965 5.96 6.93
1964 6.19 6.97
1963 6.39 7.01
1962 6.54 7.05
1961 6.65 6.97
1960 6.71 6.89

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

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

Costa Rica and Morocco demographics compared

Median age
Costa Rica

Morocco
1x
Year Median age, years
Costa Rica Morocco
2024 35.6 30.5
2023 35.1 30.2
2022 34.5 29.9
2021 34 29.5
2020 33.5 29.2
2019 33 28.9
2018 32.6 28.5
2017 32.1 28.2
2016 31.7 27.8
2015 31.2 27.5
2014 30.7 27.1
2013 30.3 26.7
2012 29.8 26.4
2011 29.4 26.1
2010 29 25.7
2009 28.6 25.4
2008 28.2 25
2007 27.8 24.7
2006 27.4 24.3
2005 27 24
2004 26.7 23.7
2003 26.3 23.4
2002 25.9 23.1
2001 25.5 22.8
2000 25.2 22.5
1999 24.9 22.2
1998 24.7 21.9
1997 24.4 21.6
1996 24.1 21.3
1995 23.9 21
1994 23.6 20.6
1993 23.4 20.3
1992 23.2 20
1991 22.9 19.7
1990 22.7 19.4
1989 22.5 19.2
1988 22.3 18.9
1987 22.1 18.7
1986 21.8 18.5
1985 21.6 18.3
1984 21.4 18.1
1983 21.2 18
1982 20.9 17.8
1981 20.6 17.7
1980 20.3 17.6
1979 20 17.4
1978 19.7 17.3
1977 19.5 17.2
1976 19.2 17.1
1975 18.9 16.9
1974 18.6 16.9
1973 18.4 16.8
1972 18.1 16.7
1971 17.8 16.7
1970 17.6 16.6
1969 17.3 16.6
1968 17.1 16.6
1967 16.9 16.7
1966 16.8 16.8
1965 16.7 16.9
1964 16.7 17
1963 16.7 17.2
1962 16.7 17.4
1961 16.8 17.6
1960 16.8 17.9

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

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

Interactive Maps

Use the buttons below to switch between world maps comparing statistics for Costa Rica and Morocco.

1x
1x
1x
1x
1x
1x
1x

National statistics comparison

Finance

Costa Rica Morocco
GNI, Atlas method
$80.2B
2024
$149B
2024
Government expenditure, % of GDP
18.9%
2024
33%
2024
Education expenditure, % of GDP
6.25%
2021
6.02%
2023
Military expenditure, % of GDP n/a
3.52%
2024
Armed forces personnel
10,000
2020
246,000
2020
Deficit/surplus, % of GDP
-3.78%
2024
-3.92%
2024
Unemployment rate
6.94%
2024
11.8%
2022
Services, % of GDP
68.8%
2024
52.7%
2024
Industry, % of GDP
19.7%
2024
25.6%
2024
Economic freedom index
69.1
2026
61.8
2026
Income share by richest 10%
34.2%
2024
31.9%
2013
Income share by poorest 10%
1.7%
2024
2.7%
2013
Number of billionaires n/a
3
2025
Percentage of billionaires n/a
0.00001%
2025
Listed domestic companies
9
2022
76
2024
Market capitalization of domestic companies
$2.23B
2022
$74.5B
2024
Total reserves including gold
$14.2B
2024
$37.1B
2024
Personal remittances received
$725M
2024
$12.5B
2024
International tourist arrivals
1,146,500
2020
2,802,000
2020
International tourism as share of exports
7.41%
2020
12%
2020
Banked people share
71.4%
2024
44.4%
2024

Energy

Costa Rica Morocco
Energy use, kg of oil equivalent per capita
1,025 kg
2023
601 kg
2023
GDP PPP per kg equivalent of energy use
$28.2
2023
$16.7
2023
Carbon dioxide (CO2) emissions
8.38 megatons
2024
70 megatons
2024
CO2 emissions per capita
1.63 tons
2024
1.84 tons
2024
Fossil fuel energy use share
51.6%
2023
90.1%
2022
Renewable energy use share
34.2%
2021
10.9%
2021
Alternative and nuclear energy use share
37.7%
2023
4.92%
2023
Net energy imports use share
60.4%
2023
93.6%
2023
Electric power consumption per capita
2,206 kWh
2023
997 kWh
2023
Renewable electricity output share
99.4%
2021
19.3%
2021
Hydroelectric share
69.3%
2023
1.18%
2023
Nuclear share
0%
2021
0%
2021
Electricity access
100%
2023
100%
2023

Society

Costa Rica Morocco
% of world population
0.06%
2024
0.47%
2024
Annual migration change
+1,000
2025
-56,254
2025
Urban population
79.3%
2024
62.8%
2024
Male:Female ratio
49.4:50.6
2024
50.4:49.6
2024
Average male height
5.71 ft
2025
5.79 ft
2025
Average female height
5.26 ft
2025
5.29 ft
2025
Quality of life index
64.8
2026
51.1
2026
Corruption Perceptions Index
56
2025
39
2025
Higher education index
73
2026
54
2026
Homicides per 100K people
17.7
2023
1.69
2024
Road traffic mortality per 100K people
14.8
2019
17
2019
Visa free countries
142
2025
83
2025
Adult literacy rate
98%
2021
77.3%
2022
English speaking
8.15%
2023
18.4%
2023
People using the Internet
85.4%
2023
91%
2023

Health

Costa Rica Morocco
Government health expenditure per capita
$1,163
2023
$232.2
2023
Out-of-pocket health expenditure per capita
$280.7
2023
$86.5
2023
Life expectancy
81.4 years
2026
75.9 years
2026
Foreign aid share of health expenditure
0.01%
2023
0.62%
2023
Physicians per 1,000 people
2.69
2022
0.74
2021
Maternal mortality per 100K births
24
2023
70
2023
Mortality rate before reaching 5 years of age
10.5
2023
16.6
2023
Obesity rate
32.3%
2022
22.5%
2022
Diabetes prevalence
9.8%
2024
11.9%
2024
Air quality index
80
2026
75
2026
Tobacco use prevalence
8.9%
2022
13%
2022
Pure alcohol consumption per capita
3.4 liters
2020
0.5 liters
2020

Territory

Costa Rica Morocco
% of world land
0.03%
2026
0.3%
2026
Land area per capita
3,843 sq mi
2024
4,525 sq mi
2024
Agricultural land area
6,534 sq mi
2026
115,013 sq mi
2026
Forest area
11,907 sq mi
2026
22,293 sq mi
2026
Roads length
3,129 mi
2017
35,626 mi
2022

In-depth comparisons

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 (1950–2026, 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. International Monetary Fund (IMF) | Fiscal Monitor (2024, retrieved 2026-02-20)
  6. LivingCost (2026, retrieved 2025-10-14)
  7. World Obesity Federation (2022, retrieved 2026-02-08)
  8. Passport Index (2025, retrieved 2026-02-08)
  9. Transparency International (2025, retrieved 2026-02-10)
  10. The Heritage Foundation | Economic Freedom Index (2026, retrieved 2026-03-09)
  11. EduRank (2026, retrieved 2025-10-13)

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.