- Must visit
Museo del Prado
World-class art museum with masterpieces by Velázquez, Goya, and Bosch; essential for Spanish and European painting.
Cheapest price
$38
Average price
$50
Fastest journey
2 h 37 m
Average duration
3 h 9 m
Trains per day
4
Distance
487 km
The best way to find a cheap train ticket from Castelldefels to Madrid is to book your journey as far in advance as possible and to avoid traveling at rush hour.
The average ticket from Castelldefels to Madrid will cost around $50 if you buy it on the day, but the cheapest tickets can be found for only $38.
Of the 4 trains that leave Castelldefels for Madrid on Fri, Jul 17, 4 travel direct so it’s quite easy to avoid journeys where you’ll have to change along the way.
On Fri, Jul 17 the direct trains cover the 487 km distance in an average of 3 h 9 m but if you time it right, some trains will get you there in just 2 h 37 m .
On Fri, Jul 17 the slowest trains will take 3 h 28 m and usually involve a change or two along the way, but you might be able to save a few pennies if you’re on a budget.








Omio recommends booking the train as it is the most popular option from Castelldefels to Madrid among Omio's users. If you are prioritising price take the bus with prices starting from $27. For those with little time consider booking a flight which can get you there in 1h 30m. The ticket price range depends on the travel mode: a bus costs an average of $27, and a flight costs an average of $50.
Distance: 302 miles (487 km)
Most popular Train | Bus | Flight | Driving |
|---|---|---|---|
$47 Average price | $45 Average price Cheapest | $110 Average price | $120 Average price (fuel + tolls) |
3h 26m Average total duration 2h 56m Onboard + 30m Additional time* | 7h 30m Average total duration 7h 0m Onboard + 30m Additional time* | 4h 30m Average total duration Fastest 1h 30m Onboard + 3h 0m Additional time* | 6h 17m Average total duration (door-to-door) |
![]() Most popular train company | ![]() Most popular bus company | ![]() Most popular airline | Your own car or car rental |
Direct Options | Direct Options | Direct Options | Direct Options |
This is compared to other travel options from Castelldefels to Madrid:
A bus is $3 (€2) less than a train for this route with tickets for a train from Castelldefels to Madrid costing on average $47 (€39).
A bus is $65 (€53) less than a flight for this route with tickets for a flight from Castelldefels to Madrid costing on average $110 (€90).
Other travel options to Madrid take longer:
Train takes on average 2h 56m.
Bus takes on average 7h 0m.
The journey is about 3h 21m faster (2h 56m by train vs 6h 17m by car) and roughly $73 (€60) cheaper once you factor in fuel and tolls ($47 (€39) vs $120 (€99)). You'll also arrive in the city centre rather than hunting for parking, and you can work, read, or watch the landscape go by instead of concentrating on the road.
Direct services run with iryo, SNCF OUIGO.
Driving is still worth considering if you want to stop along the way or need a car once you arrive.
The table below shows live departures for Castelldefels to Madrid trains for today, Thursday, July 16. You can also manually refresh the results below to see updated train journeys.
| Provider | Departs | Duration | Arrives | Transfers | Tickets |
|---|---|---|---|---|---|
06020 | On time 11:18 AM Barcelona Sants | 3h24 | 2:42 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06020 | Delayed 9:51 AM 11:51 AMCamp de Tarragona | 2h51 | 2:42 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06320 | On time 12:14 PM Barcelona Sants | 3h02 | 3:16 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06014 | Delayed 1:13 PM Barcelona Sants | 3h24 | 2:37 PM 2:37 PMMadrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06014 | Delayed 11:46 AM 1:46 PMCamp de Tarragona | 2h51 | 2:37 PM 2:37 PMMadrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06540 | Delayed 1:50 PM Barcelona Sants | 3h02 | 2:52 PM 2:52 PMMadrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06150 | On time 2:50 PM Barcelona Sants | 3h02 | 5:52 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06360 | On time 3:52 PM Barcelona Sants | 3h24 | 7:16 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06360 | Delayed 2:25 PM 4:25 PMCamp de Tarragona | 2h51 | 7:16 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06180 | On time 5:20 PM Barcelona Sants | 3h02 | 8:22 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06570 | On time 5:40 PM Barcelona Sants | 3h02 | 8:42 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06190 | On time 6:53 PM Barcelona Sants | 3h17 | 10:10 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06610 | Delayed 8:20 PM Barcelona Sants | 3h28 | 9:48 PM 9:48 PMMadrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06210 | On time 8:28 PM Barcelona Sants | 3h24 | 11:52 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
06210 | Delayed 7:01 PM 9:01 PMCamp de Tarragona | 2h51 | 11:52 PM Madrid-Puerta de Atocha-Almudena Grandes | 0 transfersDirect | |
Find all the dates and times for this journey
Compare train, bus, and flight prices over the next three weeks. See the best deals at a glance, find the lowest fares, and choose the option that fits your budget.
Trains from Castelldefels to Madrid run on average 18 times per day, taking around 2h 56m. Cheap train tickets for this journey start at $32 (€26) but you can travel from only $27 (€22) by bus.
There are 18 trains per day. The earliest train runs at 05:45, the last at 21:13. The fastest train covers the 302 miles (487 km) distance in 2h 37m.
Distance 302 miles (487 km) |
Average train duration 2h 56m |
Cheapest ticket price $32 (€26) |
Trains per day 18 |
Direct trains 18 |
Fastest train 2h 37m |
First train 5:45 AM |
Last train 9:13 PM |
Cheapest Month Nov |
Cheapest Day Tue |
High Season Jul - Sep |
Low Season Apr - Jun |
Busiest Day Fri |
Least Busy Day Sat |
Best time to book 49 days |
Discover the best of Madrid — top attractions, local food, transport tips, budget advice, and currency essentials. Plan your perfect Madrid trip today.
World-class art museum with masterpieces by Velázquez, Goya, and Bosch; essential for Spanish and European painting.
Leading modern art museum best known for Picasso’s Guernica, plus major works by Dalí and Miró.
Celebrated collection of European masters from Van Eyck to Hopper in a refined palace setting.
Madrid’s most famous park offers gardens, a boating lake, monuments, and relaxed walks in the city center.
Lively grand avenue known for architecture, shopping, theaters, and nonstop energy from day to night.
Elegant boulevard linking major museums and landmarks, ideal for a classic central Madrid walk.
A hearty chickpea stew with meats, vegetables, and broth, especially traditional in Madrid and often served in stages.
Crisp fried squid rings served in a baguette roll. This iconic Madrid street food is especially linked to bars around Plaza Mayor.
Tripe stew with chorizo and morcilla in a rich sauce. A classic old Madrid tavern dish with deep local roots.
Refined two-Michelin-star dining focused on seasonal Spanish produce, with elegant modern cooking in a polished fine-dining room.
Traditional Madrid restaurant known for cocido madrileño served in stages, with an old-school dining room and loyal local following.
Historic century-old tavern famed for roast suckling pig and Castilian dishes in a classic, wood-lined setting near Plaza Mayor.
Moderate for Western Europe: hotels vary, dining is reasonable, and public transport is good value for tourists.
Tipping is modest: round up or leave 5-10% in restaurants for good service. Taxis are usually rounded up. In cafés, small change is enough.
Official public transport app
Madrid-Puerta de Atocha-Almudena Grandes -> Puerta del Sol, Madrid
Find answers to the most common questions about traveling from Castelldefels to Madrid by train. From journey times and ticket prices to direct connections, first and last departures, and even whether the route is scenic, our FAQs cover everything you need to plan your trip. Whether you’re looking for the fastest train, the cheapest option, or tips for making the most of your visit at Madrid, this guide helps you travel smarter and with confidence.

Here are some other resources that might have the information you need