Yes, three days is the right length for Madrid, and it is what we recommend for a first visit. Three days lets you split the trip cleanly: the art triangle gets a full day (the Prado, Reina Sofia for Guernica, and the Thyssen to fill the gaps), the Habsburg old core gets its own day (the Royal Palace, Plaza Mayor, Sol, San Miguel, and Temple of Debod at sunset), and a lively barrio gets the third (La Latina, El Rastro if it is Sunday, and Malasana). You eat well across three neighborhoods, fit both the free museum evenings and proper late tapas nights, and still move at a pace that lets you sit in a plaza. What still gets cut is Salamanca, the Bernabeu, and a Toledo or Segovia day trip, which is exactly what a fourth day adds. Stay in Malasana for its independent bars, coffee and value while staying ten minutes from the center. Use the Prado's free last two hours or book a slot, and reserve the Royal Palace online before you go.