Yosemite is about 170 miles away from San Francisco and about a 4-hour drive. So, we recommend starting your day as early as 5 AM or 6 AM to have full experience in the park.