When I bought my car in 2005 I was making $45K a year. The car was $21.5K and I financed it over 5 years. The total cost at the end was $23.4K with my financing. It's paid off now, but I was making $390 payments a month which was doable.
The car is a 2004 mazda RX8. However, I wish I had bought a slightly more reliable car. Luckily I haven't had to foot the bill on the bigger issues with the problems I've had with the car so far, but the warranty finally ran out on it completely. I've already had to do two engine replacements and a catalytic converter replacement. I need to change out the air intake manifold though cause the SSV valve is stuck on it still and warranty wouldn't cover it. It runs just fine with the stuck valve, but I can't push more than 4K rpm or the engine will try to suck down more air than the manifold can provide.
I've had to replace the spark plugs about 3 times now, the ignition coils twice, break pads once, and the tires a few times as well. It's about $100 for a full set of spark plugs or ignition coils online. I've also paid about $50 per tire so far by shopping around. So I've paid out another $1000 in maintenance costs in the last 6 years for it which isn't too bad I guess.
The only reason I'm considering even getting a new car is to get something that I won't have to worry about having to do a complete engine replacement if the ignition coils fail again. Retarded design on the 04/05 models of RX8 that wasn't fixed until later models. Those of us that bought the first production runs of this car are screwed. The later ones do not have the same problems and are much more reliable. I could modify the car to fix all those design errors, but again it will cost quite a bit of cash up front to do so even if I did most of the work myself. I know soon I need to at least replace my rotors for my breaks, and rebuild the calipers or buy new ones as the front ones are sticking.
So when looking at car costs, it is not just the price of the car you must factor. Gas and maintenance are big factors as well. My car requires premium and if I'm lucky I get 20 mpg on the highway. The RX8 blows donkey balls for gas costs.
At the moment I'm stuck with the car and hoping that nothing causes it to blow up any time soon. I'll drive it into the ground and try to put the bare minimum of maintenance costs into it. Hoping to get another 2-3 years out of it before I dump it for something better.