How long were Hannah and the others kept in the boxcars in The Devil's Arithmetic?
The answer you are looking for can be found in Chatper Eleven, which details the terrifying and horrific journey that the Jews take to the concentration camp. We are told that the boxcars traveled for four days and nights. The only way that Hannah is able to tell the passing of the time is the heat, as with the midday sun the boxcar warms up so much that Hannah compares it to "an oven." However, at night, the temperature plummeted and Hannah and the others are grateful that there were so many people crowded together to keep each other warm.
The only two stops that are recorded during this four day journey allow each box car in turn one break to stretch their legs, dispose of dead bodies and get some water. However, Hannah's box car is forced to drink to the sounds of the people in the other box car hammering to be allowed out.