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. thumb|Population pyramid for Costa Rica 2023 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 (southern Costa Rica).
the 2022 census counted a total population of 5044197 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  836% whites or mestizos 67% mulattoes 24% native american 11% black or afro-caribbean; the census showed 11% as other 29% (141304 people) as none and 22% (107196 people) as unspecified thumb|population pyramid for costa rica 2023 in 2011 there were over 104000 native american or indigenous inhabitants representing 24% 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 (southern costa rica)