Madrid, where it is

Madrid, the capital of Spain, has a temperate climate, with some continental features, since it is located at the center of the Meseta, ie the Iberian plateau, at about 650 meters (2,100 ft) above sea level. So, winters are cool to moderately cold, while summers are hot and sunny.
Here are the average temperatures.
Madrid - Average temperatures
MonthJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)13461014181714953
Max (°C)101216182228323227201411
Min (°F)343739435057646357484137
Max (°F)505461647282909081685752

Precipitation is not abundant, since it amounts to 455 millimeters (18 inches) per year, in fact, the landscape of the plateau is semi-arid, especially during the summer months. The rains, however, are quite frequent from October to April. In May, and more rarely in summer, some thunderstorms can break out in the afternoon, but generally, from June to August it almost never rains.
Here is the average precipitation.
Madrid - Average precipitation
MonthJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec.(mm)403525505530151525505560455
Prec.(in)1.61.4122.21.20.60.6122.22.417.9
Days66578422367763

Winter, from December to February, is relatively mild: the average temperature in January is 5.5 °C (42 °F).
The rains, brought by Atlantic depressions, are quite frequent, but generally not abundant.
Days can be mild, especially when the Azores anticyclone settles on the Iberian Peninsula, bringing periods of good weather even in winter, with highs around 13/15 °C (55/59 °F), but nights remain typically cold, with minimum temperatures near freezing (0 °C or 32 °F). Sometimes, at night and in the early morning, especially in December and January, fog can form.
There may be some cold and windy days, with maximum temperatures around or below 5 °C (41 °F).
Every now and then, even cold waves can occur. Here are the lowest temperatures reached in the last few decades at the Cuatro Vientos airport: January 1985: -8 °C (18 °F); February 1986: -8 °C (18 °F); February 2012: -7 °C (19 °F).
In general, snowfalls are not abundant, however, the most abundant snowfall in recent decades occurred in February 1984, when 15 cm (half a foot) of snow fell, while in February 2005, 10 cm (4 inches) fell.

Summer, from June to August, is hot and sunny; the mean temperature in July is 25 °C (77 °F). The heat is often scorching during the day, in fact, the temperature can easily reach 35/36 °C (95/97 °F), with peaks of 40 °C (104 °F), however, the air is dry, so the heat is more bearable. In addition, at night, the temperature remains fairly cool, hovering typically from 15 °C to 20 °C (59 to 68 °F). However, in the hottest periods, the temperature drops to acceptable values only late at night, also because the sun sets quite late because of the time zone adopted (the sun sets at 9.45 pm in mid-July and at 9.10 pm in mid-August).

Spring and autumn are mild and variable, with sunny periods, but also the passage of Atlantic disturbances, which bring clouds and rain.

Madrid

The amount of sunshine in Madrid is great in summer, when clear skies prevail: in July, there are on average 12 hours of sunshine per day. Sunny days are possible throughout the year: after all, even from November to January, there are no less than 4/5 hours of sunshine per day. Here are the average sunshine hours per day.
Madrid - Sunshine
MonthJanFebMarAprMayJunJulAugSepOctNovDec
Hours567891112118754

Best Time


The best periods to visit Madrid are spring and autumn, especially in May, June and September. In June, however, it can already be hot. In April, it can be a bit cold, especially in the first half of the month, and at night, also in the second half of the month, when the days are generally pleasant.
September, too, is a good month, but it can still be hot at the beginning, while during the month, the first rains can occur. In October, the air is often mild, but the days are getting shorter, the rains are more frequent, and it can get a bit cold at night.
Those who can stand the heat can choose July and August, but they must be prepared to stroll around the city in very hot weather.
The temperature range between day and night is often high, so it is useful to dress in layers and to bring something warm for the evening: you may want a sweatshirt for the coolest hours also in midsummer.