If you are planing to visit Madrid you should know there are some months better than others to really enjoy this city
We recommend you to go from April to June and in September or October, these are the best months of year to visit Madrid, especially if you can not stand the heat.
Winters in Madrid are cold if you compare it with other provinces in Spain. The temperature during the day is around 10 °C-15 °C (50-59 °F), and during the night often gets below 0 °C (32 °F) even sometimes snows, in particular during January and February.
Easter in Madrid is a good time to come and if you choose that week you will able to see curious religious processions. In April you must be careful because it is the month with more rains.
The summers in Madrid can get very hot. During July and August, the daytime temperature will rarely get below 30 °C (86 °F). It is not uncommon to have temperatures above 40 °C (104 °F)
Autumn is a good time to travel to Madrid. The warm temperatures normally continue through to late October, making this time of year one of the most recommendable for visiting the city.