First there may be legal age requirements. Those should really be listened to. Often times they are "way higher" then some of the advise I am about to give.
Start small. A ten minuet run to the gas station to get snacks, or similar. Usually you can do this when the child has a good grasp of "what to do" at home. If she is thirsty, can she get a drink. Does she know what parts of the home to go into and which parts to stay out of. You would really want the child to be past the "explore around the house" phase. They should be able to find and use the phone, and know when and when not to call for help. They should be able to know where to get their toys and where and how to play with them. They should be able to tell what toys are only for when Mommy is around and what toys are ok all the time. Siblings also play an important role. 2 or 3 kids with an older kid is safer then 1 young kid. You can (and in my opinion should) so this pretty young. It will depend on child, but 5-7 years old seems ok. Remember, there are no hard and fast rules, and you still want to let a neighbor friend know. The idea is that the child should be left alone to gain a bit of independence, but not long enough that they are likely to get into any bigger trouble then a large mess in the house.
A half hour trip to a friends house. In addition to whats listed above, once they are comfortable with the 10 min. alone time, you can start with a longer 30 min. trip. Probably want to stay close for this one. Like, visit with a neighbor. The idea here is to extend the time your out of the house. 30 mins is enough time to get into some trouble though, so stay close. Really this is going to be when the child is comfortable at home for short periods, and your comfortable that he knows when to get drinks, and what drinks to get. i.e. Get a juice box instead of pour milk.
1 - 2 hours. Now this is where it gets tricky. The child needs to be old enough to know when to get food and drinks and what food and drinks to get. Maybe prepared snack is fine, but cooking dinner is not. When to use a phone and who to call. They also need to have good stranger skills and know the difference between a friendly neighbor and a regular neighbor. They should be able to handle some household chores, and have a good idea about what needs to be done. It's going to be a comfort thing again, but 10-14 may be ok. I would personally end up on the high side, but "when I was a kid" I think I was in the 1-2 hour phase at around 7. Remember, the two main things here are, can they handle problems, like spilled milk. And are they able to reason out what to do when they have a problem they can't handle. When is it good to call 911 and when is a good time to call Mom and Dad.
4 or more hours. Teens. That's the real answer. More then a couple of hours means the ability to handle almost all the day to day tasks of the house. To be able to figure out what to do when there is nothing to do, and to understand the risks of not doing those things. Rather that is 13 or 17 is a tough call, but the teen should be able to actually handle common household issues with the same thought process as you. Toilet, backs up, can they plunge it. Cooking fire, do they know to reach for the baking soda? Etc. etc.
Days. Umm, never? Seriously, though, there is no are for this one. It's older, but because it's older you have to weigh the risk of parties, sex, and other activities against the individual and trust. Basically can you trust the person enough to handle adult situations well enough. Everyone will have to handle this on a case by case basis.
Note about ages
A lot of this depends on comfort levels. "When I was a kid" sucks as a measurement these days. When I was a kid I was left alone for a couple of hours when I was around 7. But I lived in a neighborhood where I knew my neighbors across the street. I knew them right up until they passed a few years ago actually. People don't do that any more in most places. But at the same time, cell phones didn't exist, and nothing like FaceTime or google video where around. So keep in mind some kids will be OK alone for a lot longer at a younger age then others. Some kids will never be ok with it.