Two Trains Crossing: Formula, Relative Speed and Examples

Two Trains Crossing problems use the combined lengths of the trains and their relative speed. For trains moving in opposite directions, speeds are added; for trains moving in the same direction, speeds are subtracted. The crossing time is found by dividing the total distance covered by the relative speed, with all units kept consistent.

On this page

What is Two Trains Crossing?

Two trains crossing means finding the time taken for one train to completely pass the other. The distance covered relative to the other train equals the sum of their lengths.

If the train lengths are L₁ and L₂, the required distance is L₁ + L₂. For opposite directions, relative speed is S₁ + S₂. For the same direction, relative speed is |S₁ − S₂|. Therefore, crossing time is calculated as (L₁ + L₂) ÷ relative speed, after converting speeds and lengths into compatible units.

Two Trains Crossing Formula & Tricks

Important Formulas

Opposite-direction crossing
Time = (L₁ + L₂) / (S₁ + S₂)

Add the lengths of the trains and divide by the sum of their speeds when they move towards each other.

Same-direction crossing
Time = (L₁ + L₂) / |S₁ − S₂|

Add the train lengths and divide by the positive difference between their speeds when they move in the same direction.

Speed conversion
Speed in m/s = Speed in km/h × 5/18

Use this conversion when lengths are given in metres and time is required in seconds.

Length from crossing time
L₁ + L₂ = Relative speed × Time

The total length of both trains equals the relative distance covered during crossing.

Quick Tricks

Add or subtract speeds by direction

Use addition for opposite directions and subtraction for the same direction. The direction determines relative speed, not the order in which the trains are mentioned.

Example: At 54 km/h and 36 km/h, opposite-direction relative speed is 90 km/h, while same-direction relative speed is 18 km/h.
Use total train length as distance

For complete crossing, the rear of one train must pass the front and then the entire length of the other train. Hence, distance is L₁ + L₂, not the difference of lengths.

Example: For trains of lengths 120 m and 180 m, the relative distance is 300 m.
Convert before calculating

When lengths are in metres and time is in seconds, convert every speed to m/s before applying the formula.

Example: 72 km/h = 72 × 5/18 = 20 m/s.

Two Trains Crossing Concepts

Trains Moving in Opposite Directions

When two trains move towards each other, their relative speed is the sum of their speeds.

The trains reduce the gap between them simultaneously, so their relative speed is S₁ + S₂. The crossing time is (L₁ + L₂) ÷ (S₁ + S₂). For example, trains of lengths 150 m and 250 m moving at 54 km/h and 36 km/h have relative speed 90 km/h = 25 m/s. Their crossing time is 400 ÷ 25 = 16 seconds.

Example: Two trains of lengths 150 m and 250 m move in opposite directions at 54 km/h and 36 km/h. Time = (150 + 250) ÷ (90 × 5/18) = 400 ÷ 25 = 16 seconds.

Trains Moving in the Same Direction

When a faster train overtakes a slower train, their relative speed is the difference between their speeds.

The faster train gains on the slower train at S₁ − S₂, where S₁ > S₂. Complete crossing still requires a relative distance equal to L₁ + L₂. For example, if lengths are 180 m and 120 m and speeds are 72 km/h and 54 km/h, relative speed is 18 km/h = 5 m/s, so time is 300 ÷ 5 = 60 seconds.

Example: A 180 m train at 72 km/h overtakes a 120 m train at 54 km/h. Time = 300 ÷ (18 × 5/18) = 300 ÷ 5 = 60 seconds.

Finding Unknown Train Length

An unknown length can be found by multiplying relative speed by crossing time and subtracting the known train length.

If one train has length L₁, then the other length is L₂ = relative speed × time − L₁. Relative speed must be calculated using addition or subtraction according to the direction of motion.

Example: Two trains cross in 12 seconds in opposite directions at 36 km/h and 54 km/h. Relative speed is 90 × 5/18 = 25 m/s, so total length is 25 × 12 = 300 m. If one train is 140 m long, the other is 160 m long.

Comparing Crossing Times

For the same pair of trains, crossing time changes inversely with relative speed.

Since time = total length ÷ relative speed, a higher relative speed gives a shorter crossing time. If the total lengths are unchanged, the ratio of times is the inverse ratio of relative speeds.

Example: If relative speeds are 20 m/s and 25 m/s for the same total train length, the crossing-time ratio is 25:20, which simplifies to 5:4.

Two Trains Crossing Video Lessons

Watch short topic-wise lessons for quick revision.

11 Lessons
Lesson 1 of 11 Quick Revision

Two Trains in Opposite Directions

Learn how to calculate the time, speed, distance, and relative speed involved when two trains cross each other while travelling in opposite directions.

Continue with more lessons and practice in PrepShots.Watch More in App - Start ₹1 Trial →
More Two Trains Crossing Lessons Scroll to explore →

Practice Two Trains Crossing Questions

Practise published questions related to this topic.

1A store selling mobile accessories has a special offer on screen guards: when a customer buys two screen guards priced at ₹ 400 each, they receive a 5% discount on the total bill. How much does the customer have to pay after the discount is applied?→ 2What is the lowest form of the fraction 72/96 obtained by cancelling the HCF of the numerator and denominator?→ 3The marked price of an article is Rs. 2000. It is sold at a discount of 10 percent. The profit percentage is 60 percent. What is the cost price of the article?→ 4A = Largest two digit number exactly divisible by both 4 and 7. B = Largest three digit number exactly divisible by both 7 and 11. What is the value of B - A?→ 5Find the rate of discount when the marked price is Rs. 3500 and the selling price is Rs. 3150.→ 6√48+√27-√12 = ?→ 7A drone technician is programming a flight controller. He notices that three-fifths of the square of a certain safety distance value used in the code equals 126.15. He needs to determine the original safety distance to update the firmware correctly. What is that number?→ 8The profit obtained by selling a bicycle for ₹840 is the same as the loss incurred if it is sold for ₹760. What will be the percentage profit if the bicycle is sold for ₹900?→ 9A shopkeeper offers the following four schemes. A) Two successive discounts of 19% and 19% B) Buy 2, get 10 C) Discount of 11% D) Two successive discounts of 25% and 17% Which scheme is best for customers?→ 10Which of the following will have the highest selling price?→

Two Trains Crossing Quick Quiz

Attempt 5 questions and check your score instantly.

Quick Revision Notes

Two Trains Crossing: Quick Revision

Use the direction of motion to select relative speed, then divide the combined train length by that speed.

  • Complete crossing distance = length of first train + length of second train.
  • Opposite directions: relative speed = S₁ + S₂.
  • Same direction: relative speed = |S₁ − S₂|.
  • Crossing time = (L₁ + L₂) ÷ relative speed.
  • Convert km/h to m/s by multiplying by 5/18.
  • Convert m/s to km/h by multiplying by 18/5.
  • For an unknown total length, use total length = relative speed × time.
  • Use the same units for distance, speed and time before calculation.

Two Trains Crossing FAQs

What is the formula for two trains crossing in opposite directions?

Time = (L₁ + L₂) ÷ (S₁ + S₂). Lengths and speeds must use compatible units.

What is the formula when two trains move in the same direction?

Time = (L₁ + L₂) ÷ |S₁ − S₂|. Subtract the slower speed from the faster speed.

Why are train lengths added when two trains cross?

For complete crossing, one train must cover its own length relative to the other train and also pass the other train’s full length. Therefore, the relative distance is L₁ + L₂.

Two trains of lengths 100 m and 150 m move in opposite directions at 36 km/h and 54 km/h. What is their crossing time?

Relative speed = 90 × 5/18 = 25 m/s. Time = (100 + 150) ÷ 25 = 10 seconds.

Two trains move in the same direction at 72 km/h and 54 km/h. What is their relative speed?

Relative speed = 72 − 54 = 18 km/h, which equals 18 × 5/18 = 5 m/s.

How is the length of one train found if crossing time is given?

First find total length using total length = relative speed × time. Then subtract the known train length from the total.

Continue learning Two Trains Crossing on PrepShots

Continue on PrepShots