Skip to content
3D map of Costa Rica’s population in 2020, north up, one column for each 250 m square as tall as its density: the tallest columns stand over Purral, with Alajuela the next labelled town

World / North America / Costa Rica

Costa Rica’s population density is 262 people per square mile

5,105,525 people on 19,521 sq mi (50,560 km²) · 87th of 193 countries by density · World Bank, 2023

Costa Rica 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 2 mi (3 km); sand: no one

Where Costa Rica’s 5,128,928 people lived in 2020: a 3D model with one column for each 820 ft (250 m) 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; town names from GeoNames. Download the map (PNG) Download the figures (CSV)

Costa Rica has 262 people per square mile (101 per km²): 5,105,525 people on 19,521 sq mi (50,560 km²) of land, the World Bank’s official estimate for 2023. That ranks 87th of 193 countries and 14th of 22 in North America. 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: Costa Rica, official estimates 2023
Population5,105,525
Land area19,521 sq mi50,560 km²
Density262 per sq mi101 per km²
Rank by density87th of 19314th of 22 in North America

Where Costa Rica’s people live

Costa Rica’s people live close together on a small part of its land. The JRC’s population grid counts 5,128,928 people in 2020 and places each one on the map above.

0.86%of the land holds half of all residents.
4.4%of the land holds four in five.
48.1%of the land has no modeled residents.
10,087people per sq mi (3,895 per km²) around the average resident, about 39 times the national density. This population-weighted density is the crowding people actually live in.
  • 0.86% of the land: half of all residents
  • 3.5% of the land: the next 30%
  • 47.5% of the land: the last 20%
  • 48.1% of the land: nobody

Modeled estimates for 2020 (JRC GHS-POP R2023A). The shares and the weighted density are counted on 1 km squares; the map is built from the same people on 250 m squares.

Cities and towns

The JRC’s 2020 grid finds five places in Costa Rica big and dense enough to count as urban centres. Together they hold 49.0% of all residents. Another 25.0% live in urban clusters, the JRC’s class for towns and suburbs, and 26.0% in rural areas.

Urban centrePeople, 2020Share of Costa Rica
San José2,169,89642.3%
Cartago190,4253.7%
San Isidro52,7821.0%
Limón52,5221.0%
Liberia50,0461.0%

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 Costa Rica’s density changed

Costa Rica’s density went from 70 to 262 people per sq mi between 1961 and 2023 (27 to 101 per km²), the years the World Bank series covers.

1961: 70 per sq mi2023: 262 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 2,112,621 people then and 5,128,928 in 2020,a rise of 142.8%. Over the same years the population’s centre moved 5.8 mi (9.3 km) west-northwest, toward San José.

YearPeopleWeighted density, per sq mi (km²)In urban centres
19752,112,6215,978 (2,308)33.5%
19802,415,2966,541 (2,526)35.5%
19852,772,7517,141 (2,757)36.0%
19903,160,0397,768 (2,999)40.5%
19953,575,3328,517 (3,288)42.9%
20003,982,5639,411 (3,634)45.2%
20054,319,8979,532 (3,680)44.5%
20104,626,7929,614 (3,712)46.2%
20154,900,2669,734 (3,758)46.2%
20205,128,92810,087 (3,895)49.0%

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 Costa Rica’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 1.9% 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

More than half of Costa Ricans live in the Valle Central,1 a highland valley that holds most of the country’s large cities, where the capitals of four provinces, Alajuela, Heredia, San José and Cartago, cluster together.2 San José’s urban centre holds 42.3% of the people on the grid and Cartago’s 3.7%.

Elsewhere settlement came later. The San Carlos Plain, in the northern lowlands, was settled mainly after 1945, when roads linked it to the Valle Central,3 and people moved into the Valle del General, in the south, after the Inter-American Highway was built during and after the Second World War.4 The grid finds no residents on 48.1% of the land.

Costa Rica compared

Costa Rica is more densely populated than any of its neighbours. Panama comes closest, with 156 people per sq mi, 60% of Costa Rica’s density; Nicaragua has 147, 56% of Costa Rica’s density.

CountryPeople per sq miper km²Population
Costa Rica2621015,105,525
Panama156604,458,759
Nicaragua147576,823,613

Official estimates for 2023, World Bank. Costa Rica 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, Cambodia (256), Iraq (269), Côte d'Ivoire (254), Hungary (272) and Armenia (272) have nearly the same density. In North America, Costa Rica ranks 14th of 22 by density, behind leaders Barbados, Haiti and Grenada. The full ranking is on the population density by country page.

A US state the same size

West Virginia is the US state closest to Costa Rica in land area: 24,041 sq mi against 19,521. It holds 1,766,147 people (2025 estimate): 73 per sq mi (28 per km²), while Costa Rica has 3.6 times that. See the West Virginia 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 262 per sq mi spreads people over all of Costa Rica’s land, empty or not; 10,087 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 Costa Rica’s population density

What is the population density of Costa Rica?
262 people per square mile (101 per km²), the World Bank’s official estimate for 2023: 5,105,525 people on 19,521 sq mi (50,560 km²) of land. That ranks Costa Rica 87th of 193 countries.
What US state is closest in size to Costa Rica?
West Virginia, by land area: 24,041 sq mi against Costa Rica’s 19,521 sq mi. West Virginia has 73 people per sq mi (2025); Costa Rica has 262 (2023).
Where do most people in Costa Rica live?
Half of the population lives on 0.86% of the land. Costa Rica’s 5 urban centres, led by San José (2,169,896 people), Cartago (190,425) and San Isidro (52,782), hold 49.0% of all residents, and 26.0% live in rural areas (JRC modeled estimates for 2020).
Is Costa Rica densely populated?
It sits in the middle of North America’s table, 14th of 22 countries by density. Its neighbours range from Nicaragua at 147 people per sq mi to Panama at 156.

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, “Costa Rica: People”. www.britannica.com
  2. Encyclopaedia Britannica, “Valle Central”. www.britannica.com
  3. Encyclopaedia Britannica, “San Carlos Plain” (from Costa Rica: Settlement patterns). www.britannica.com
  4. Encyclopaedia Britannica, “Valle del General”. 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”.