The answer depends on both state laws and your child’s maturity. Eight is probably the youngest age it’s safe to leave a child alone, but depending on area guidelines and your child’s abilities, age 10–14 may be a bit safer.
While Kevin McCallister did just fine at age 7, most states have guidelines suggesting the age to leave a child alone, and a few even have specific limits. Additionally, you should take into account your child’s capabilities: Do they know how to contact authorities in the event of an emergency? Can they keep themselves safe for a few hours? These factors and others should go into the decision of whether to leave your child home alone.