Costa Rica, officially the Republic of Costa Rica (Spanish: Repblica de Costa Rica), is a Central American country bordered to the north by Nicaragua, to the northeast by the Caribbean Sea, to the southeast by Panama, to the southwest by the Pacific Ocean, and to the south by the Cocos Island maritime border with Ecuador. It has a population of around 5 million people and a land area of 51,060 km2 (19,710 sq mi). San José, the capital and main city, is home to an estimated 333,980 inhabitants, with a population of about two million in the surrounding metropolitan region.
A unitary presidential constitutional republic is the sovereign state. It is well-known for its long-standing and stable democracy, as well as its well-educated workforce. The government spends around 6.9 percent of its budget (2016) on education, compared to 4.4 percent globally. Its economy, which was historically highly reliant on agriculture, has now expanded to include industries like banking, corporate services for international corporations, medicines, and ecotourism. Many international industrial and service businesses operate in Costa Rica's Free Trade Zones (FTZs), where they may take advantage of investment and tax breaks.
Costa Rica was inhabited by indigenous peoples prior to Spanish colonization in the 16th century. It remained a peripheral province of the empire until independence as part of the First Mexican Empire, after which it joined the Federal Republic of Central America, from which it proclaimed independence in 1847. After a short civil war in 1948, Costa Rica completely dissolved its army in 1949, becoming one of just a few sovereign states without a standing force.
The nation has regularly fared well in the Human Development Index (HDI), ranking 62nd in the world and sixth in Latin America as of 2020. The United Nations Development Programme (UNDP) has also identified it as having achieved substantially greater human development than other nations at comparable economic levels, with a better record of human development and inequality than the region's median. It also compares well to the condition of democracy, press freedom, and subjective pleasure. It boasts the seventh freest press in the world, according to the Press Freedom Index, the 37th most democratic nation in the world, and the 12th happiest country in the World Happiness Report.