I'm taking the Caltrain from San Francisco to Mountain View (for the first time in many years). A one-way trip costs $6, and a day pass is $12. To drive, it would cost me about $5.70 in fuel (each way) without factoring in wear on my car.[^1] It took me 24 minutes to walk to the train station, and I had to wait 10 minutes for the train to leave. It will take me 5 minutes to walk to my destination when I arrive. That's a total of 39 minutes.
Driving to Mountain View in morning traffic takes between 45-75 minutes (on the short side, if I commute with Pam).
If I take the train, I get to work or read or listen to music on the way down. I get 50 minutes of walking in per day, and I avoid the (small amount of) anxiety from fighting through traffic. But I'm not sure it's worth it... and if Pam and I both took the train, it would cost $24 per day[^2], which is more than 2 times the cost of driving.
[^1]: I wouldn't consider factoring in the cost of the car because I'd have a car regardless of my frequency of train travel.
[^2]: We probably wouldn't be taking the train every day, so it isn't really worth buying monthly passes (which work out to just over $7 per day for use every business day).