How long does it take for a ship to travel through the Panama canal?

The transit time for a ship to travel through the Panama Canal varies depending on several factors including the size of the vessel, its speed, and the traffic in the canal. On average, it takes a ship around 8 to 10 hours to transit through the canal from one ocean to the other. However, larger vessels such as container ships or bulk carriers may take longer, sometimes up to 12 hours or more.