The driving distance between San Francisco, CA and Los Angeles, CA is 381 miles. The driving time would be approximately 6 hours if driving non-stop in good conditions. (The driving time does not take into consideration conditions such as weather, road work and rush hour traffic in urban areas.)
Another Answer:
Los Angeles, US -118.2430
34.0522 San Francisco, US -122.4180
37.7750
Miles: 347.16
Kilometers: 558.68 Bearing: NW
These are the coordinates of LA and SF and the distances between them.
Depending on how fast you travel you can take from 5 hours to 7 hours. 8 hours max if you just want to explore and enjoy the view.
Google Earth calculates the journey as 282 miles - taking approximately 6 hours 18 minutes.