The time it takes for a ship to pass through the Panama Canal varies depending on factors such as the size of the ship, the traffic in the canal, and the efficiency of the operations. On average, it can take anywhere from 8 to 10 hours for a ship to complete a full transit of the canal.