We will be arriving late in March 2020 at the Madrid airport (from the USA with a 3.5 hour layover in Barcelona) at 16:40 on a Wednesday and departing from same at 12: 15 on a Monday. Will either time likely subject us to heavy traffic and extended drive times? Put more plainly, how long time-wise to Puerta del Sol from the airport and at what time should we plan to leave PdS to arrive at the airport (for a flight to Paris) with at least a couple of hours to spare? We plan on taxi service for both trips.
Ask your landlord/host how long the trip is?
Hard to know definitely because there are many factors in all cities. That being said, go to google maps next week, Monday and Wednesday, and search each route at approximately the same timeframe and you can get some data to think about. Also since you are going to use taxis your lodging host will know about local patterns and be able to advise you in arranging a taxi for your return trip to the airport.