Visitors come to Barcelona for its beaches, nightlife, events, and outdoor activities such as hiking, biking, sunbathing, and sightseeing. The most popular time to visit is during the summer, when schools are on vacation and the weather is hot. In the spring, fewer people visit and temperatures are cooler than summer.
Barcelona is the second largest city in Spain after Madrid, and the capital of Catalonia, with a population of 1,621,537 within its administrative limits on a land area of 101.4 km2 (39 sq mi). The urban area of Barcelona extends beyond the administrative city limits with a population of between 4,200,000 and 4,500,000 within an area of 803 km2 (310 sq mi), being the sixth-most populous urban area in the European Union after Paris, London, Ruhr area, Madrid and Milan. About five million people live in the Barcelona metropolitan area. It is also Europe's largest metropolis on the Mediterranean Sea. It is the main component of an administrative area of Greater Barcelona, with a population of 3,218,071 in an area of 636 km² (density 5,060 hab/km²). It is located on the Mediterranean coast between the mouths of the rivers Llobregat and Besòs and is bounded to the west by the Serra de Collserola ridge (512 m/1,680 ft).
Barcelona is today one of the world's leading tourist, economic, trade fair/exhibitions and cultural-sports centres, and its influence in commerce, education, entertainment, media, fashion, science, and the arts all contribute to its status as one of the world's major global cities. Indeed, it is a major cultural and economic center in south-western Europe (Iberian Peninsula), 26th in the world (after Moscow, before Dubai) and a growing financial centre (Diagonal Mar area and Gran Via). One of Europe's principal Mediterranean ports can be found here as well as Barcelona international airport, which handles above 34 million passengers per year. It also boasts an extensive motorway network and is a hub of high-speed rail, particularly that which will link Spain with France and the rest of Europe. Barcelona is the 16th-most-visited city in the world and the fourth most visited in Europe after Paris, London, and Rome, with several million tourists every year. Barcelona is the 14th most "livable city" in the world according to lifestyle magazine Monocle. Similarly, according to Innovation Analysts 2thinknow, Barcelona occupies 13th place in the world on Innovation Cities™ Global Index. It is the fourth richest city by GDP in the European Union and 35th in the world with an output amounting to €177 billion, a figure nonetheless smaller than alternative estimates. Consequently, its GDP per capita output stands at €39,859 – some 44% higher than the European Union average and GDP per head is €80,894 according to Eurostat. Similarly, the city of Barcelona stands in 29th place in a list of net personal earnings headed by Zurich. The city is Europe's third and one of the world's most successful as a city brand, both in terms of reputation and assets. Barcelona is the seventh most important fashion capital in the world. Also, the city is Europe's fourth best business city and fastest improving European city, with growth improved by 17% per year. Barcelona, among world centers of commerce takes second place in economic stability.
Founded as a Roman city, Barcelona became the capital of the County of Barcelona. After merging with the Kingdom of Aragon, Barcelona became one of the most important cities of the Crown of Aragon. Besieged several times during its history, Barcelona has a rich cultural heritage and is today an important cultural centre and a major tourist destination. Particularly renowned are the architectural works of Antoni Gaudí and Lluís Domènech i Montaner, which have been designated UNESCO World Heritage Sites. The headquarters of the Union for the Mediterranean is located in Barcelona. The city is known for hosting the 1992 Summer Olympics as well as world-class conferences and expositions, including the 1888 Exposición Universal de Barcelona, the 1929 Barcelona International Exposition (Expo 1929), the 2004 Universal Forum of Cultures, and the 2004 World Urban Forum.
As the capital of the autonomous community of Catalonia, Barcelona is the seat of the Catalan government, known as the Generalitat de Catalunya; of particular note are the executive branch, the parliament, and the Supreme Court of Catalonia. The city is also the capital of the Province of Barcelona and the Barcelonès comarca (district).