Miles per hour (mph) is a British imperial and United States customary unit of speed expressing the number of miles covered in one hour.
To calculate speed in mph, you must have your distance in miles and time in hours.
Formula to calculate mph.

Example:
Suppose a locomotive travels for 12 miles in 2 hours. Calculate the speed of the locomotive in mph.

Therefore, the train’s speed in 6 miles per hour.