Capital of Spain since 1561, Madrid sits on a high plateau at 650m elevation — making it one of Europe's highest capitals. The city grew from a Moorish fortress into the heart of the Spanish Empire. Home to the Prado, Reina Sofía, and Thyssen museums, its Golden Triangle of Art is rivalled only by Paris. The Gran Vía, Retiro Park, and legendary tapas bars of La Latina define its restless, late-night energy.
Nights sit around 16°C and afternoons around 27°C, though some days reach 33°C.
Madrid has real seasons: summer afternoons sit around 33°C, winter ones around 12°C.
Some summer days reach 39°C, and some winter nights drop below freezing.
Most of the rain falls in autumn, least in summer. In November it rains about 8 days in 30; in August, 2.
Wind is rarely an issue; most months sit between calm and a light breeze. Air quality is worth watching: January averages an AQI of 59, while May clears to 34.
Days stretch to about 14.9 hours of light in June and shrink to 9.1 in December — something to weigh if you work to a fixed timezone.
For what you're after, the best months in Madrid are June – August. Expect fast internet (373 Mbps) and a high cost of living (about €2200 a month).
Affiliate links: if you book through them I earn a small commission, at no extra cost to you.