Answer: around 25km, but it is very well connected by car, via the first ring road (M30) northbound, taking the exit to A2 highway and then going straight ahead for 10km. A taxi trip is around 25€ off-peak hours. An alternative road, depending on traffic conditions, can well be going north Paseo Del Prado/Castellana axis (in front of Atocha station), and connect with the A2 via the tunnel in that street some 5km north. The distance is shorter, more traffic lights, but you skip the M30 ring road that may be desirable. Madrid peak traffic hours are 8:00AM-10:00AM and 19:00PM-21:00PM. There are two Underground stations in barajas airport so the train is an excellent option too.