It all depends on how old it is, how often you let it out, and if you feed it in the crate.
The rule of thumb is if the dog is 2 months old add on one hour. So this making it comfortable for a dog 2 months old to last 3 hours in the crate. Three month old + one will be comfortable after going potty for 4 months.
age+1 After the dog goes potty. Very important to let the dog go potty first.
The reason for no food in the crate is that after you eat you need to poop, when you drink you need to go to the bath room.