I'm looking to buy a car, possibly used, and one of the major factors in my decision on which one to get is going to be the total cost of ownership over the time period I plan to own the car.

There are plenty of websites out there that let you calculate the total cost of ownership of any particular model of vehicle, but all the ones I could find were heavily focused on new vehicles. (E.g. How much will it cost you to buy this vehicle new and own it for 5 years?) This doesn't help me, as I also want to consider the possibility of buying used in order to minimize the higher depreciation costs of the first several years of ownership.

Ideally what I want to do is plot the historical average total cost of ownership of various car models over the lifetime of those vehicles, in order to find the time period where that cost is minimized. For example, suppose one model of car has a high cost of ownership during its first two years due to depreciation, then that cost levels off for years 3-5 before it starts ramping up again due to higher repair and maintenance costs. In such a case I would conclude that it's most cost efficient to buy that particular model of car used when it's 2 years old, own it for 3 years, then sell. I'd like to run this same calculation across many different makes and models of cars in order to find the ones where this period of minimal cost is lowest. (Then filter by other criteria of my choosing, such as which optional features each car possesses; though I'm comfortable doing that part manually with a few Google searches.)

To accomplish this I need data; lots of data. Hence my post here. Does anyone know if detailed information on the ownership costs of various vehicles is publicly available? Or am I out of luck? (I suspect I am, but I figured it couldn't hurt to at least ask before I'm forced to give up and make my choice in a less data-driven way.)