When to Go
Madrid is hot and dry in summer—with temperatures reaching 40ºC (105°F) in July and August—and chilly and damp in winter, with minimum temperatures around 1ºC (in the low 30s), though snow in the city is rare. The most pleasant time to visit is spring, especially May, when the city honors its patron saint with street fairs and celebrations. June and September–December are also fine times to visit.
If you can, avoid Madrid in July and August—especially August, even though fares are better and there are plenty of concerts and open-air activities; locals flee the punishing heat and head to the coast or to the mountains, so many restaurants, bars, and shops are closed. Winter is a pleasant time to visit, if you don't mind bundling up a bit in the evenings.