Generally, yes, but sometimes, no.
Cost to drive is based on the cost of driving each mile, plus the cost of driving around to find parking. The cost of driving around (getting nowhere) is based on calculating the amount of gas burned by just idling. I use gallons of gas per hour, which I base on 60mph/x mpg, or around 2. I could also base it on 25mph/x mpg, which is closer to 1. I’m not sure which is more accurate.
Hybrid cars should have a number closer to 0.5, because they get around 50 mpg in the city, but don’t idle the engine, but they do consume some power.
I didn’t add in the cost of parking, because it’s unpredictable, and it generally costs more than driving or using any transit — sometimes more than using a taxis. So, parking is the critical decision: if you need to pay for parking at the destination, and are willing to pay, you should drive. If you aren’t willing to pay, use transit.
I didn’t add in the cost of wear and tear, but the IRS puts the price of gas + wear at around 55 cents per mile. I also didn’t add in the cost of an old junker car ($2,000 or so plus around $500 a year repairs) and the cost of insurance ($800 or more).
I don’t mean this to be an anti-car-pro-bus advocacy page. Most places are largely inaccessible by transit, and attaining and maintaining a middle class life virtually requires you to drive and own a reliable car.