Prius 180A couple of years ago, I ran some numbers trying to figure out which was the better buy for the planet — a biodiesel Jetta or a hybrid Prius. And I came to the tentative, but perhaps counterintuitive, conclusion that the best buy was … wait for it … a Toyota Corolla.

The Corolla, you see, was thousands of dollars cheaper than the Prius (the runner-up), even after I accounted for all the savings on gas from driving a fuel-miser. And if you were a green-minded consumer — someone whose top priority was reducing climate-warming emissions, say — you could probably put those thousands to better use somewhere else. Depending on the circumstances, I figured that lots of other investments — power-sipping appliances, say, or a furnace upgrade, or home insulation, or even donations to a worthy cause — might all count as “better buys” than a brand-new Prius.

But with recent gas-price spikes, I wondered if my earlier calculations were still holding true. And I’ve got to admit it: if you’re in the market for a new car, a Prius is looking better and better all the time.

Take, for example, the most recent figures from Intellichoice, an online car-buying and -rating service. They compiled figures on total ownership costs — depreciation and financing, maintenance, repairs, fuel, insurance, yada-yada — for a boatload of new cars. From that, they picked the best buy in each vehicle category: the car or truck that had the lowest overall ownership costs for the first five years after purchase.

Grist thanks its sponsors. Become one.

On this measure, the Toyota Prius rates as the best overall value among all mid-sized cars. It holds its value well over five years; repairs aren’t too costly; and the fuel costs are rock bottom. All in all, a pretty cheap car to own — proof that treading more lightly on the planet doesn’t have to lighten your wallet. Nice job, Prius!

But that’s not the final word. A lot of people looking to buy a “greener” car purchase would be willing to consider a much smaller car than the Prius — they may just want to get around town, and they don’t care if their ride is roomy or stylish. And with a low-end Prius still going for at least $21,000, it’s possible that a cheaper, smaller car would still have the edge — if the buyer’s willing to spend the difference on other green priorities.

Grist thanks its sponsors. Become one.

So I looked at the best buy among subcompacts, which turned out to be the nonhybrid, two-door Toyota Yaris hatchback. (The Honda Civic Hybrid, by the way, won in the compact car category. Hybrids are now, quite clearly, a cheap car to own.) With a sales price almost $10,000 less than a Prius, I thought, surely the Yaris would be a contender as the better buy overall.

Only not so much. Intellichoice puts the total, five-year ownership costs of a Yaris at almost $20,800, counting depreciation, gas, insurance, repairs, etc. A Prius comes in at a little above $22,200 over the same span. So over five years, the difference isn’t all that great.

But then, when I dove into the numbers a bit, I think that the Prius makes an even better case for itself. Total fuel costs for both vehicles were calculated at $2.19 per gallon. But actual prices at the pump haven’t been that low in well over a year; these days, $3.00 seems cheap, at least to me. And when I bumped up the price of gas to a more reasonable level, the gap between the Prius and the Yaris narrowed even more.

Then, if you include all the “externalities” of gasoline — including international security costs, which really don’t figure in coal or natural gas — the it looks like the five-year cost gap between the Prius and the Yaris is pretty negligible. (See p. 2 of this analysis of cafe standards for a description of the plausible range for gasoline externalities.)

This is a point worth repeating, so I’ll say it again: based on this data, buying a new Prius, and driving it for five years, costs only a teensy bit more than buying a Yaris — even though the sticker price of the Yaris is $10,000 less.

I don’t have the data to extend this analysis past five years. It could be that, after year five, the Yaris starts doing better than the Prius — perhaps the Yaris depreciates slower, since it’s got less value to lose and no battery to replace. But at the same time, the fuel efficiency savings of the Prius will keep racking up; and if gas prices rise even a bit from where they are now, those will keep the Prius looking better and better.

Obviously, your mileage may vary. If you don’t drive your car all that much, then the fuel-saving beneifts of the Prius shrink. Also, I haven’t compared the manufacturing emissions of the two cars — and on that score, the Prius batteries weigh against it, since they require a fair amount of energy to make.

Still, consider me chastened. Despite what I said a few years ago, if I had to recommend a new car right now, I’d probably shade towards the Prius; even if it winds up being a few hundred dollars more expensive than the Yaris, all things included, the hedge against gas price spikes could be worth it. So even if you don’t need the roomier ride, or care about the extra features of the Prius, you could still come out ahead in the end — and with a few spare nickels to spend on something far more worthy than a car.

Update: I’m still not sure how I feel about a new Prius vs. a good-quality used car. I’ll let y’all know, if and when I run those numbers.