If it's Amtrak, about 3 miles.
As a counter to this low-effort, flip comment, I semi-regularly take the Amtrak Capitol Corridor from San Jose to Sacramento. It is about 3 hours. It takes about 2 hours to drive with no traffic, but if you need to travel on a weekday during the morning or early evening, the train is much faster. And you can read/work/sleep/whatever.
Even with bad traffic it takes longer for me to take the Metrolink to LA than if I drive. Up until recent gas price increases it was more expensive too. I haven't experienced rail service on the east coast, but at least in my experience on the west coast it is horribly broken. I say this as someone who believes in it and wants it to be successful. I have given it so many chances and it has failed me every time.