If the dog is an adult dog then you can leave the dog alone in the house for up to six hours per day but even 8 hours a day is okay.
If you're gonna be gone longer than 8 hours in a day you should have someone come over and check on the dog.
For a puppy you should never leave the puppy alone in the house longer than 2 hours.