According to the
Brazilian Institute of Geography and Statistics the area of the municipality is , of which urban area. It is located at 22°54′21″S, 47°03′39″W and is at a distance of northwest of São Paulo. Its neighboring cities are Paulínia, Jaguariúna and Pedreira, north; Morungaba, Itatiba and Valinhos in the east; Itupeva, Indaiatuba and Monte Mor, south, and Hortolândia in the west.
Ecology Most of the original vegetation of the city was largely eliminated. Like 13 other municipalities in the metropolitan region of Campinas, the city is subject to some
environmental stress, and Campinas is considered one of the areas liable to
flooding and
silting; it now has less than 5% of
vegetation cover in total area. Trying to reverse this situation, several projects have been and are being conducted and planned, such as building corridors, and the regulation of the Management Plan of Environmental Preservation Area (APA) in Campinas. There are also several environmental projects to combat the destruction of
riparian forests located along the banks of the
Atibaia river, which has a high level of
pollution. Today, Campinas houses the
area of relevant ecological interest (ARIE)
Mata de Santa Genebra, , established in 1985 by the city of Campinas'
Fundação José Pedro de Oliveira and regulated by the Brazilian Environment and Renewable Natural Resources Institute (
IBAMA). This is the now second-largest
urban forest of Brazil, behind only the
Tijuca Forest, in
Rio de Janeiro. Winters are generally dry and mild (rarely too cold), and summers rainy with warm to hot temperatures. The warmest month is February, with an average temperature of 24 °C, an average maximum of 29.1 °C and average minimum of 19.0 °C. The coldest month, July, sees respective temperatures of 17.8 °C, and 24.2 °C and 11.4 °C average maximum and minimum. Fall and spring are transitional seasons. The average annual rainfall is 1424.5 mm and the driest month in August, when there is only 22.9 mm. In January, the rainiest month, the average is 280.3 mm. In recent years, however, the hot, dry days during the winter have been increasingly frequent, often surpassing 30 °C, especially between July and September. In August 2010, for example, the rainfall in Campinas was only 0 mm. During the dry season and long dry spells in the middle of the rainy season are also common records of fires in the hills and thickets, especially in rural areas of the city, which contributes to deforestation and the release of pollutants into the atmosphere, further worsening air quality. The lowest temperature recorded in the city was −1.5 °C on June 25, 1918. The highest temperature was 39.0 °C, observed on 17 November 1985. The highest cumulative rainfall recorded in 24 hours in the city between June 1988 and October 2008 was 143.4 mm in 25 days May 2005. Between 1890 and 2004 there were 41 occurrences of frost in Campinas. The most recent was on June 31, 2025, when the minimum temperature reached 1.8 °C. There are also occasional episodes of strong winds, with gusts exceeding 100 km / h, and training records were made in the city day May 4, 2001 and March 9, 2008. The wet season is from mid-October to mid-April, with heavier rains particularly in December, January, February and early March, and the dry season is from mid-May to mid-September. Average
rainfall is 24.3 mm in August and 267.8 mm in January. Average
humidity ranges from 37% (August) to 56% (January). In the region around Campinas near the state of
Minas Gerais there are a number of cities which enjoy an even milder mountain climate, such as
Serra Negra,
Socorro,
Lindóia and
Águas de Lindoia, where several water
spas are located. {{Weather box|width=auto {{cite web {{cite web ==Demographics==