even tho i've never been to stanford <shudder>, SFO is definitely closer.
everytime, i fly into SFO, i take the samtrans bus to the colma BART stop (northbound)... its either the BX or KX line. anyways, the other one, takes you straight to stanford (southbound), if you want to do that
also, you might consider flying into sanjose. i don't know where you are flying from, but southwest is hella cheap, i'm a big fan, i've flown with them prob over 50 times 🙂 , but anyways they don't fly to SFO, only oakland and san jose.