Because of its geographical location in the middle of the country, Madrid is a very dry city and can be quite hot in summer but bitterly cold in winter. Winter temperatures hover around 50 F/10 C during the day but plunge below freezing at night. In summer, highs sometimes reach 104 F/40 C. The hottest months are July and August, but sunny weather continues well into October, when high temperatures range 71-80 F/22-27 C. Spring (April and May) is usually lovely.
Rain is rare, and what little falls is most likely to come down in spring and fall (April, May, October and November). Unlike in nearby Avila and Segovia, on the other side of the protective Guadarrama mountain range, snow in the capital itself is very unusual, but it can happen.