Before I proceed with the answer, you need to keep in mind that there are two types of trains, freight and passenger.
Why is it important? Because their lengths are totally different.
So how long is a train? Freight and passenger.
A freight train length is anywhere between 140 feet and 10,000 feet or 1.9 mile. However there were instances where a freight train has reached over 18,000 feet or 3.4 miles, pulling 295 cars.
The 150 feet long train is a combination of one locomotive and one train car, where the locomotive has approximately 73 feet and the train car has another 68 feet.
Of course you will rarely see such a short train, but it is possible, as mentioned before, thanks to the distributed power, many locomotives can connect together to pull an astonishing amount of weight.
Now on the other side, the 10,000 feet train would consist of 140 train cars and 6 locomotives.
How long is a passenger train?
A passenger train is way shorter than a freight train, ranging between 80 feet and 1000 feet.
Most of the passenger trains in the United States are averaging around 6-10 cars. However the scenario of one car connected to one locomotive, or even just one self powered train car also known as a railcar is quite common (especially in Europe).
Other related questions and answers for how long is a train?
What is the maximum legal length of a train in the US?
At this moment federal or state authorities do not impose a limit on how long a train can be.
Because of this we can see examples where a train consist of 200 cars and 6 locomotives can block a grade crossing for over an hour, which can be quite frustrating (at least) for the drivers.
However, towns have passed laws that will prohibit blocking grade crossing for longer than a few minutes. For example, in the great state of Illinois, the village of Franklin Park has made it illegal for railroads to block the grade crossings for more than 10 minutes. Their law sounds like this:
5-6-12. - Railroads not to obstruct grade crossings.
(a) It is unlawful for a railroad corporation to permit any train, railroad car or engine to obstruct public travel at a railroad-highway grade crossing for a period in excess of ten (10) minutes, except where such train, railroad car or engine cannot be moved by reason of circumstances over which the railroad corporation has no reasonable control.So in Franklin Park, no train crossing may legally be blocked for more than ten minutes at a time, and in fact the village issues fines to Canadian Pacific on a fairly regular basis for violations. Especially at the Edgington Avenue crossing, because that crossing is immediately adjacent to the police station…
Source : Municode Library