I just created a public (anyone can view HMB to UCSF map) Google Map showing the route from Montara to UCSF - 24 miles; 38 minutes. If you are in Half Moon Bay, it probably makes sense to go over Hwy 92 and then 280 South, which will add a few more minutes and will have more traffic - depending on the time of day you commute.
I used Montara as an example because sometimes potential buyers think there's only Half Moon Bay here, and there's also El Granada, Moss Beach, Montara, and then on the other side of Devil's Slide is Pacifica. It's actually a fairly short and very beautiful drive from Montara into San Francisco.
It would be worth your time to drive it a few times at different hours of the day.