structural:summarization
Demographics

The 2022 census counted a total population of 5,044,197 people. In 2022, the census also recorded ethnic or racial identity for all groups separately for the first time in more than ninety-five years since the 1927 census. Options included indigenous, Black or Afro-descendant, Mulatto, Chinese, Mestizo, white and other on section IV: question 7. In 2011 data for the following groups were : 83.6% whites or mestizos, 6.7% mulattoes, 2.4% Native American, 1.1% black or Afro-Caribbean; the census showed 1.1% as Other, 2.9% (141,304 people) as None, and 2.2% (107,196 people) as unspecified.

In 2011, there were over 104,000 Native American or indigenous inhabitants, representing 2.4% of the population. Most of them live in secluded reservations, distributed among eight ethnic groups: Quitirrisí (in the Central Valley), Matambú or Chorotega (Guanacaste), Maleku (northern Alajuela), Bribri (southern Atlantic), Cabécar (Cordillera de Talamanca), Ngäbe (southern Costa Rica, along the Panamá border), Boruca (southern Costa Rica) and Térraba (southern Costa Rica).

The population includes European Costa Ricans (of European ancestry), primarily of Spanish descent, with significant numbers of Italian, German, English, Dutch, French, Irish, Portuguese, and Polish families, as well a sizable Jewish community. The majority of the Afro-Costa Ricans are Creole English -speaking descendants of 19th century black Jamaican immigrant workers.

The 2011 census classified 83.6% of the population as white or Mestizo; the latter are persons of combined European and Amerindian descent. The Mulatto segment (mix of white and black) represented 6.7% and indigenous people made up 2.4% of the population. Native and European mixed-blood populations are far less than in other Latin American countries. Exceptions are Guanacaste, where almost half the population is visibly mestizo, a legacy of the more pervasive unions between Spanish colonists and Chorotega Amerindians through several generations, and Limón, where the vast majority of the Afro-Costa Rican community lives.

Costa Rica hosts many refugees, mainly from Colombia and Nicaragua. As a result of that and illegal immigration, an estimated 10–15% (400,000–600,000) of the Costa Rican population is made up of Nicaraguans. Some Nicaraguans migrate for seasonal work opportunities and then return to their country. Costa Rica took in many refugees from a range of other Latin American countries fleeing civil wars and dictatorships during the 1970s and 1980s, notably from Chile and Argentina, as well as people from El Salvador who fled from guerrillas and government death squads.

According to the World Bank, in 2010 about 489,200 immigrants lived in the country, many from Nicaragua, Panama, El Salvador, Honduras, Guatemala, and Belize, while 125,306 Costa Ricans live abroad in the United States, Panama, Nicaragua, Spain, Mexico, Canada, Germany, Venezuela, Dominican Republic, and Ecuador. The number of migrants declined in later years but in 2015, there were some 420,000 immigrants in Costa Rica and the number of asylum seekers (mostly from Honduras, El Salvador, Guatemala and Nicaragua) rose to more than 110,000, a fivefold increase from 2012. In 2016, the country was called a "magnet" for migrants from South and Central America and other countries who were hoping to reach the U.S.