Madrid to Barcelona
Quick answer
Take the high-speed train from Madrid Atocha to Barcelona Sants for a city-centre trip.
If you land at Madrid Barajas and can book Barcelona on the same airline ticket, compare the onward flight before making the trip into Madrid.

How long is the high-speed train from Atocha to Sants?
Search for Madrid Puerta de Atocha–Almudena Grandes and Barcelona Sants. iryo describes its 621 km journey as taking over three hours and asks passengers to arrive at the station 30 minutes before departure. Use the times for the particular train you’re considering. For a hotel near Sants, most of the trip is over when you step off. For a meeting near El Prat airport, add the journey from Sants to your appointment. iryo journey and boarding guidance · Renfe route guide
Before buying separate tickets to reach Atocha or leave Sants, check the rail fare you chose. Renfe says its AVE and Larga Distancia tickets on this route include a qualifying Cercanías commuter journey. If you would use that connection, count it when comparing the Renfe price with an iryo or OUIGO quote. Metro travel is a separate calculation. Renfe’s ticket inclusions
When is flying faster door to door?
If you're arriving at Madrid Airport and continuing to Barcelona, compare a through flight with the journey into Madrid to catch a train. The Madrid airport railway serves Terminal 4. At Barcelona, the R2 Nord train serves Terminal 2. Someone arriving at T1 who wants the train into town must first use the free inter-terminal shuttle. Check the terminal on the actual flight before you price either transfer. Madrid airport rail · Barcelona airport rail
For a fixed appointment, work backwards from the address in Barcelona. With a train, allow for the trip from Sants. With a flight, allow for leaving the plane, collecting any checked bag and reaching the address from El Prat. If your meeting could overrun, Iberia’s Puente Aéreo offers an open-ticket option with its Flexible fare. Iberia Air Shuttle fare conditions

Is the train cheaper than flying?
Look up fares for the same day and arrival window with all three high-speed operators. You can compare your quote with the monthly rail average from Spain’s competition regulator, CNMC. It records what passengers paid across operators for the month shown. The specific train, baggage allowance and fare conditions determine your own price. Renfe · iryo · OUIGO
For example, a €48 flight and a €60 train leave €12 for all the extra costs of flying. A €15 bag by itself uses up that advantage. This is an illustration with round numbers. For the price series, the month and operator coverage matter more than the last cent. CNMC dataset and methodology
Barcelona to Madrid
If you're staying near Sants, search Barcelona Sants → Madrid Puerta de Atocha. If you land at El Prat and are continuing straight to Madrid, compare a through flight first. To connect to a train at Sants, allow for baggage collection, the shuttle if arriving at T1, and the wait for the R2 Nord. A separately purchased train leaves at its booked time even when your flight runs late. Renfe’s Barcelona–Madrid route · El Prat rail access