Skip to content

Economy of Costa Rica vs Morocco compared: GDP & Debt

Updated on by Georank team

Costa Rica has a GDP of $95.4B compared to $161B for Morocco, ranking 73/197 and 58/197 by economy size, respectively.

Costa Rica has $57B in government debt (59.8% of GDP), compared to $109B (67.7% of GDP) in Morocco.

Costa Rica vs Morocco GDP by year

Costa Rica
Morocco
1x
Year GDP, current $
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/economy/costa-rica/morocco | CC BY

GDP per capita in Costa Rica vs Morocco by year

Costa Rica
GDP per capita

GDP per capita, PPP
Morocco
GDP per capita

GDP per capita, PPP
1x
Year Current $
Costa Rica Morocco
GDP per capita GDP per capita, PPP GDP per capita GDP per capita, PPP
2024 $18,587 $31,107 $4,218 $10,415
2023 $16,942 $28,909 $3,872 $9,895
2022 $13,626 $26,226 $3,516 $9,310
2021 $12,838 $23,853 $3,843 $8,623
2020 $12,394 $22,100 $3,317 $7,705
2019 $12,885 $23,340 $3,560 $8,046
2018 $12,590 $21,498 $3,553 $7,801
2017 $12,317 $20,499 $3,344 $8,115
2016 $12,091 $19,202 $3,186 $7,853
2015 $11,715 $17,525 $3,190 $7,799
2014 $10,911 $16,394 $3,483 $7,237
2013 $10,803 $15,232 $3,425 $7,542
2012 $10,127 $14,464 $3,206 $7,308
2011 $9,276 $13,614 $3,345 $7,274
2010 $8,266 $12,928 $3,107 $6,849
2009 $6,833 $12,274 $3,158 $6,629
2008 $6,937 $12,472 $3,222 $6,437
2007 $6,138 $11,842 $2,788 $6,058
2006 $5,257 $10,800 $2,466 $5,781
2005 $4,703 $9,899 $2,268 $5,275
2004 $4,431 $9,365 $2,207 $5,025
2003 $4,173 $8,863 $1,962 $4,741
2002 $4,068 $8,461 $1,612 $4,436
2001 $3,985 $8,190 $1,521 $4,269
2000 $3,813 $7,879 $1,513 $3,930
1999 $3,691 $7,563 $1,651 $3,801
1998 $3,617 $7,306 $1,683 $3,740
1997 $3,408 $6,890 $1,439 $3,502
1996 $3,227 $6,568 $1,610 $3,551
1995 $3,275 $6,515 $1,478 $3,152
1994 $3,040 $6,276 $1,369 $3,315
1993 $2,840 $6,025 $1,236 $2,979
1992 $2,612 $5,635 $1,337 $2,979
1991 $2,253 $5,175 $1,302 $3,025
1990 $1,830 $5,021 $1,238 $2,777
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/economy/costa-rica/morocco | CC BY

Costa Rica's GDP per capita is $18,587, ranking 62/197, compared to $4,218 in Morocco, ranking 127/197. Adjusted for purchasing power (GDP per capita PPP), Costa Rica ranks 72nd at $31,107, while Morocco ranks 132nd at $10,415.

Economic indicators

Costa Rica Morocco
Gross domestic product
$95.4B
2024
$161B
2024
GDP rank
73/197
2024
58/197
2024
GDP growth
4.32%
2023-2024
3.79%
2023-2024
GDP per capita
$18,587
2024
$4,218
2024
GDP per capita rank
62/197
2024
127/197
2024
GDP per capita, PPP
$31,107
2024
$10,415
2024
GDP per capita PPP rank
72/197
2024
132/197
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
2024
104/185
2024
Average annual personal income after taxes
$12,150
2026
$5,678
2026
Market capitalization of domestic companies
$2.23B
2022
$74.5B
2024
Number of billionaires n/a
3
2025
Income share by richest 10%
34.2%
2024
31.9%
2013
Income share by poorest 10%
1.7%
2024
2.7%
2013
Government expenditure, % of GDP
18.9%
2024
33%
2024
Consumer prices inflation
-0.41%
2023-2024
0.99%
2023-2024
Central bank interest rate
3.5%
2025
2.25%
2025
Unemployment rate
6.94%
2024
11.8%
2022
Population
5181862
38871720

Spending and national debt comparison by year

Costa Rica
Spending

Debt
Morocco
Spending

Debt
1x
Year % of GDP
Costa Rica Morocco
Government spending Government debt Government spending Government debt
2024 18.9% 59.8% 33% 67.7%
2023 18.5% 61.1% 32% 68.7%
2022 19.2% 63% 33.7% 71.4%
2021 20.8% 67.6% 31% 69.4%
2020 22.3% 66.9% 34.1% 72.2%
2019 21.7% 56.4% 27.6% 60.3%
2018 18.9% 51.8% 27.8% 60.5%
2017 19.2% 47.1% 27.9% 60.3%
2016 18.8% 44.1% 28.6% 60.1%
2015 18.8% 39.8% 28.5% 58.4%
2014 18.4% 37.4% 30.7% 58.6%
2013 18.5% 35.1% 30.4% 57.1%
2012 17.3% 33.7% 32.5% 52.3%
2011 17.2% 29.5% 31.2% 48.6%
2010 18% 28.1% 28.7% 45.3%
2009 16.7% 26% 28.1% 42.6%
2008 15.2% 24% 28.3% 42%
2007 14.6% 27% 26.4% 47.1%
2006 15.2% 33% 26% 50.6%
2005 15.9% 37.3% 28.6% 54.8%
2004 17% 41% 24.5% 54.4%
2003 17.6% 40.6% 24.1% 56.9%
2002 18.6% 41.4% 25.8% 59.4%
2001 17.3% 39.6% 23.7% 60.4%
2000 16.9% 38.9% 22.8% 64.9%
1999 16.7% 39% 18.4% 63.4%
1998 16% 40.7% 18.7% 64.5%
1997 16.3% 30.6% 18.6% 68%
1996 17.3% 33.7% 17.6% 65.3%
1995 16.4% 29.1% 21.3% 72.2%
1994 17.4% 27% 21.7% 69.3%
1993 13.8% 24.4% 23.1% 74.7%
1992 13.7% 23.3% 22.3% 67%
1991 14% 28.4% 20.8% 59.1%
1990 18.9% 18.5% 22.6% 70.5%
1989 26.1% 19.3% - -
1988 24.5% 18.2% - -
1987 27.2% 21.2% - -
1986 26.4% 26.1% - -
1985 21.8% 22.8% - -
1984 22.8% 25.2% - -
1983 23.6% 29.8% - -
1982 18.4% 31.8% - -
1981 21% 32.3% - -
1980 25% 37.7% - -
1979 24.9% 39.5% - -
1978 23.2% 41.7% - -
1977 19.3% 27.8% - -
1976 20.1% 29.5% - -
1975 19.1% 26.1% - -
1974 18.3% 30.3% - -
1973 18.4% 32.8% - -
1972 17.2% 31.8% - -
1971 17.5% 30.4% - -
1970 14.9% 28.6% - -
1969 14.5% 26.1% - -
1968 13.8% 27.7% - -
1967 14.7% 26.7% - -
1966 14.3% 24.8% - -
1965 13.8% 24.1% - -
1964 13.5% 22.7% - -
1963 13.3% 21.8% - -
1962 14% 19.7% - -
1961 13.2% 20.3% - -
1960 12.5% 16.1% - -

Data sources: International Monetary Fund (IMF) | Fiscal Monitor (1990–2024, retrieved 2026-02-20); International Monetary Fund (IMF) | Public Finances in Modern History (1960–1995, retrieved 2026-02-20).

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

In 2024, Costa Rica's government spending was $18B, accounting for 18.9% of its GDP, while Morocco spent $53.1B, or 33% of GDP.

Debt-to-GDP ratio is 59.8% in Costa Rica and 67.7% in Morocco, ranking 79/185 and 60/185, respectively.

Government deficit by year

Deficit/surplus
Costa Rica

Morocco
1x
Year Deficit/surplus, % of GDP
Costa Rica Morocco
2024 -3.78% -3.92%
2023 -3.25% -4.41%
2022 -2.81% -5.37%
2021 -5.09% -5.92%
2020 -8.38% -7.15%
2019 -6.68% -3.8%
2018 -5.66% -3.52%
2017 -5.88% -3.3%
2016 -5.09% -4.49%
2015 -5.52% -4.59%
2014 -5.45% -4.78%
2013 -5.25% -4.7%
2012 -4.22% -6.63%
2011 -3.91% -6.08%
2010 -4.96% -3.93%
2009 -3.25% -1.63%
2008 0.18% 0.63%
2007 0.56% -0.12%
2006 -1.04% -1.8%
2005 -2.09% -5.46%
2004 -3.42% -3.31%
2003 -3.43% -3.74%
2002 -4.99% -4.37%
2001 -3.47% -3.79%
2000 -3.68% -1.97%
1999 -2.88% 3.21%
1998 -2.96% 1.47%
1997 -3.39% 1.5%
1996 -4.32% 0.87%
1995 -3.68% -2.54%
1994 -5.46% -2.51%
1993 -1.52% -2%
1992 -1.51% -1.84%
1991 -2.41% -0.9%
1990 -4.4% -1.32%
1989 -1.55% -
1988 0.57% -
1987 -2.57% -
1986 -4.26% -
1985 -1.06% -
1984 -0.5% -
1983 -1.84% -
1982 -0.94% -
1981 -3.14% -
1980 -7.24% -
1979 -6.6% -
1978 -4.12% -
1977 -2.63% -
1976 -2.42% -
1975 -1.13% -
1974 0.26% -
1973 -2.41% -
1972 -4.54% -
1971 -4.72% -
1970 -1.41% -
1969 -1.61% -
1968 -1.72% -
1967 -3.03% -
1966 -2.12% -
1965 -1.71% -
1964 -1.51% -
1963 -2.01% -
1962 -1.99% -
1961 -0.71% -
1960 -0.19% -
1959 0.49% -
1958 0% -
1957 0.3% -
1956 0.05% -

Data sources: International Monetary Fund (IMF) | Fiscal Monitor (1990–2024, retrieved 2026-02-20); International Monetary Fund (IMF) | Public Finances in Modern History (1956–1989, retrieved 2026-02-20).

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

In 2024, Costa Rica's government deficit, the difference between spending and revenue, was $3.61B, equivalent to 3.78% of GDP. This compares to Morocco's deficit of $6.3B, or 3.92% of GDP.

Over the past 35 years, Costa Rica recorded a fiscal deficit in 33 of those years, while Morocco ran a deficit in 30 years. On average, Costa Rica posted an annual deficit equal to 3.8% of GDP, compared to deficit of 2.92% of GDP for Morocco.

Inflation comparison by year

Inflation
Costa Rica

Morocco
1x
Year Consumer prices inflation
Costa Rica Morocco
2024 -0.41% 0.99%
2023 0.53% 6.09%
2022 8.27% 6.66%
2021 1.73% 1.4%
2020 0.72% 0.71%
2019 2.1% 0.3%
2018 2.22% 1.8%
2017 1.63% 0.75%
2016 -0.02% 1.64%
2015 0.8% 1.56%
2014 4.52% 0.44%
2013 5.23% 1.88%
2012 4.5% 1.29%
2011 4.88% 0.91%
2010 5.66% 0.99%
2009 7.84% 0.97%
2008 13.4% 3.71%
2007 9.36% 2.04%
2006 11.5% 3.28%
2005 13.8% 0.98%
2004 12.3% 1.49%
2003 9.45% 1.17%
2002 9.17% 2.8%
2001 11.3% 0.62%
2000 11% 1.89%
1999 10% 0.68%
1998 11.7% 2.75%
1997 13.2% 1.04%

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

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

Over the past 28 years, Costa Rica has recorded an average annual inflation rate of 6.66%, compared with 1.82% in Morocco. In 2024, inflation was -0.41% in Costa Rica and 0.99% in Morocco.

Top exports between countries

Costa Rica
Export category Export value
Raw agricultural goods $11.5M
Processed food, beverages & tobacco $1.5M
Machinery & equipment $189K
Raw materials & minerals $57K
Wood & paper products $47K
Chemicals & pharma $27K
Textiles & consumer goods $14K
Miscellaneous $8K
Morocco
Export category Export value
Animal & marine products $1.22M
Processed food, beverages & tobacco $282K
Wood & paper products $42K
Machinery & equipment $20K
Textiles & consumer goods $20K
Chemicals & pharma $6K
Raw materials & minerals $1K

Balance of trade

Costa Rica Morocco
Current account balance
-$1.25B
2024
-$1.87B
2024
Current account balance ranking
129/190
2024
141/190
2024
Current account balance, % of GDP
-1.31%
2024
-1.16%
2024
Goods imports
$23.1B
2024
$66.5B
2024
Goods exports
$20.6B
2024
$39.3B
2024
Service imports
$7.58B
2024
$14.3B
2024
Service exports
$16.3B
2024
$28.2B
2024
Imports of goods and services, % of GDP
32.8%
2024
50.2%
2024
Exports of goods and services, % of GDP
38.5%
2024
42%
2024

Economic freedom indices

The indices of economic freedom below are issued by the Heritage Foundation. Higher scores indicate stronger economic health.

Costa Rica Morocco
Economic freedom 69.1 61.8
Economic freedom ranking 43/197 91/197
Property rights 66 55.2
Government integrity 64.1 35.6
Judicial effectiveness 76.9 32.5
Tax burden 78.6 65.5
Government spending 89.3 67.5
Fiscal health 75.6 57.5
Business freedom 79.9 72.1
Labor freedom 55.9 46.2
Monetary freedom 78.2 79.6
Trade freedom 75 69.8
Investment freedom 50 80
Financial freedom 40 80

Economic freedom comparison by year

Costa Rica
Morocco
1x
Year Economic freedom index
Costa Rica Morocco
2026 69.1 61.8
2025 68.6 60.3
2024 67.7 56.8
2023 66.5 58.4
2022 65.4 59.2
2021 64.2 63.3
2020 65.8 63.3
2019 65.3 62.9
2018 65.6 61.9
2017 65 61.5
2016 67.4 61.3
2015 67.2 60.1
2014 66.9 58.3
2013 67 59.6
2012 68 60.2
2011 67.3 59.6
2010 65.9 59.2
2009 66.4 57.7
2008 64.2 55.6
2007 64 56.4
2006 65.9 51.5
2005 66.1 52.2
2004 66.4 56.7
2003 67 57.8
2002 67.5 59
2001 67.6 63.9
2000 68.4 63.2
1999 67.4 63.8
1998 65.6 61.1
1997 65.6 64.7
1996 66.4 64.3
1995 68 62.8

Data sources: The Heritage Foundation | Economic Freedom Index (1995–2026, retrieved 2026-03-09).

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

The Economic Freedom Index for Costa Rica is 69.1, ranking 43/197, compared to 61.8 for Morocco, ranking 91/197. The chart above displays a comparison of annual changes in economic freedom indexes.

Other economic metrics

Costa Rica Morocco
Services, % of GDP
68.8%
2024
52.7%
2024
Industry, % of GDP
19.7%
2024
25.6%
2024
Agriculture, forestry, and fishing, % of GDP
3.56%
2024
10.6%
2024
GNI, Atlas method
$80.2B
2024
$149B
2024
GNI per capita, PPP
$28,840
2024
$10,260
2024
Total reserves including gold
$14.2B
2024
$37.1B
2024
Total reserves ranking
70/177
2024
52/177
2024
Net foreign direct investment
-$4.96B
2024
-$948M
2024
Net inflows of foreign direct investment
$5.3B
2024
$1.64B
2024
Net outflows of foreign direct investment
$337M
2024
$691M
2024
Servicing debt to the IMF, % of GNI
6.31%
2023
5.63%
2024
Poverty at national poverty lines
20.3%
2024
3.9%
2022
Gross capital formation, % of GDP
15.7%
2024
30.1%
2024

GDP per capita map

1x

Data sources: World Bank | Economy & Growth (1985–2024, retrieved 2026-04-06); U.S. Census Bureau (1985–2024, retrieved 2026-02-08).

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

Compare countries by 7 more topics

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 | Economy & Growth (1960–2024, retrieved 2026-04-06)
  2. International Monetary Fund (IMF) | Fiscal Monitor (1990–2024, retrieved 2026-02-20)
  3. International Monetary Fund (IMF) | Public Finances in Modern History (1956–1995, retrieved 2026-02-20)
  4. The Heritage Foundation | Economic Freedom Index (1995–2026, retrieved 2026-03-09)
  5. U.S. Census Bureau (1985–2024, retrieved 2026-02-08)
  6. TradeMap (2020–2024, retrieved 2026-02-08)
  7. United Nations | World Population Prospects (2026, retrieved 2026-03-10)
  8. LivingCost (2026, retrieved 2025-10-14)

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.

The current account balance is the sum of net trade in goods and services, net earnings from cross-border investments, and net transfer payments. It reflects a country's economic transactions with the rest of the world and is a fundamental component of the balance of payments. A surplus indicates that a country exports more than it imports, while a deficit shows the opposite.

Gross National Income (GNI) measures a country's total income. It encompasses income earned by residents, businesses, and foreign sources, defined as employee compensation and investment profits. GNI adds product taxes not included elsewhere and subtracts subsidies. It accounts for income from residents working abroad but excludes earnings from foreigners within the country.

A negative value for Net Foreign Direct Investment indicates a country is a net receiver of investments, as foreign inflows exceed outflows after Balance of Payments adjustments. A positive value indicates a net provider, with outflows exceeding inflows. Inflows are credits (increasing foreign claims on domestic assets), while outflows are debits (increasing domestic assets abroad).

Foreign direct investment (FDI, net inflows) shows how much capital foreign investors bring into a country after accounting for any funds that flow back in the opposite direction. It represents the net value of overseas companies establishing, expanding, or financing businesses in the reporting country. A positive number means more capital entered the country than was withdrawn, while a negative number means foreign investors pulled out more than they invested.

Foreign direct investment (FDI, net outflows) shows how much capital residents of a country invest abroad after accounting for any funds that flow back in the opposite direction. It represents the net value of domestic companies establishing, expanding, or financing businesses in other countries. A positive number means more capital was invested abroad than withdrawn, while a negative number means residents pulled back more than they invested.

Principal and interest payments to the IMF in currency, goods, or services on long-term debt expressed as a share of GNI.

Formerly gross domestic investment, gross capital formation measures the share of a country’s economic output invested in fixed assets, including buildings, machinery, and infrastructure. It indicates how much of the economy is devoted to building productive capacity.