The odometer on my car is nearing 223,000 miles. While I am hoping the dented-on-all-four-sides sedan is going to make it to at least 250,000 miles and beyond, realistically, we need to plan for a replacement.

How To Buy The Right Car For Your Wallet

But before we go car shopping, we need to decide what we are looking for. There are a lot of things to consider here like the manufacturer, style, color, etc., not to mention just our own personal tastes in the matter. You can really go to town thinking about all the possibilities. But I wanted to simplify the process. I wanted to narrow it down to the basic decision of finding the best car for our situation at a price we could afford. I didn't want our wants to become our needs, at least not until I got further along in the process.

How to compare cars side by side
I was talking about it to the editor here at Get Rich Slowly, who shared a spreadsheet her husband created. The spreadsheet takes the cost of a vehicle and spreads it out over the remaining effective life of the vehicle. So using these two factors, the cost divided by the number of expected lifetime miles, you get the cost per mile. It's at least one way to compare different cars against each other in a way that's like comparing apples to apples and oranges to oranges. It doesn't factor in the cost to operate the vehicle, just the cost to purchase the vehicle. You can add the cost to operate into the mix later on to get a better picture of your overall cost if you want, but those costs depend on your own situation anyway.

Using the formula below, you can create your own spreadsheet to get an idea of which cars could make a better purchase (at least from the standpoint of how much of a dent it makes to your wallet initially). The cars in the table below serve as examples, but you can instantly see how the cost per mile goes up depending how much the car costs, how many miles it has, and how long of a life it could have. The most cost-effective cars have a lower per-mile cost, like the 2008 Smart Car at $0.07 per mile.

Capitalized $Cost/Mile = Cost/(Expected Lifetime Mileage -- Current Mileage)

Vehicle Price Current Mileage Expected Lifetime Mileage Capitalized $/mile
2008 Smart Car $7,500 36,426 140,000 $0.07
VW Passat $28,391 17,622 250,000 $0.12
2008 Volvo S60 $11,000 61,850 140,000 $0.14
2008 MB ML320 SUV CDI 4WD (white) $23,888 81,694 250,000 $0.14
2013 Subaru Legacy $19,981 10,200 150,000 $0.14
2009 MB ML320 SUV BlueTEC 4WD (white) $29,000 47,704 250,000 $0.14
2013 Nissan Rogue (Hertz Rental Cars) $15,995 29,112 140,000 $0.14
2011 MB ML350 BlueTEC AWD, RAB Motors $32,988 31,432 250,000 $0.15
New 2014 MB GLK250 SUV BlueTEC 4WD (white) $40,105 3 250,000 $0.16
New 2014 Ford Escape AWD $25,264 11 140,000 $0.18
New Audi A7 diesel $75,000 1 250,000 $0.30
New Lexus GS350 AWD $65,633 1 200,000 $0.33
BMW 750i XDrive $37,999 27,431 140,000 $0.34
2009 Land Rover Sport BMW $29,872 54,050 140,000 $0.35

Narrowing the field: Deciding what kind of vehicle we need (and want)
It helps if you know generally what kind of vehicles to put into the spreadsheet to begin with, so I started to look at what I thought our needs might be.

1. Size. Currently, we are a family of five, although we may expand the family again. Anything is possible. In addition, having just enough seats for each family member is inconvenient when our kids have friends over. So a six-passenger vehicle would really be nice. However, I want to be open to the most economical option, so it is time to be realistic. We haven't added to the family. Wishing for additional seating happens maybe four to five times per year. Could we be creative to address that problem when it happens? Besides, there are very few six-passenger vehicle options. When I built my own spreadsheet, one Mazda and a few big truck models (and we don't want or need a big truck) were all I could find. From there, it's seven- or eight-passenger seating.

2. Expected lifetime. Opinions differ on how long cars drive without incurring major repair bills, but let's use 140,000 miles for a gas engine and 250,000 for a diesel. So many other factors affect this: your driving style, whether you perform preventive maintenance, and even the type of mileage you put on the vehicle, just to name a few. Now that I work from home — even though we typically drive out of state several times per year — I think 10,000 miles per year is a safe estimate for us. Since I seem to drive my vehicles for six to seven years (longer, if possible), it seems that we should set our sights on a car with 90,000 miles (or fewer) on it (140,000 minus 50,000 miles). I also would like it to be a 2006 or newer.

I searched dealerships and private sales in my area. I originally started with vehicles with 90,000 miles or less, seating for five or more, and $10,000 or less. I got a surprise or two as I plugged different vehicles into the spreadsheet.

My first surprise was how few vehicles fit within those parameters. Maybe this is just my geographical area, though -- or am I dreaming to think that we could buy a vehicle with 70,000 miles for $10,000?

Second, I assumed that cars would always be a cheaper option (as compared to minivans and SUVs). But that is not always the case. As an example, a Buick Lacrosse I found cost more per mile than a newer Chrysler Town and Country. Again, there are so many variables: size of car, options, etc., but this is a fun way to view the car's purchase price in black and white.

Periodically, I have heard arguments about whether buying new or used cars is a better deal. I like buying used cars at this point in my life because I have a couple of mechanics in the family and I also don't want to tie up $30,000 in a car or minivan. In the few examples that I plugged into the spreadsheet, used trumped new every time. However, I didn't factor in any dealer incentives like cash back or zero-percent financing.

Once I had a feel for how vehicles stacked up against each other in terms of raw cost per mile, I started thinking about the operating cost for some of the front-runners.

3. Cost to drive/maintain. Obviously, cars that get better gas mileage will be cheaper to drive. Gas mileage is easy to determine since it is listed with the car's specifications. It is more challenging to compare repair costs, though, because repairs on certain cars are more expensive than others. For instance, my brother works at a BMW dealership and says parts are so expensive on BMWs that he wouldn't drive one ... even though he could do the repair work himself. Insurance costs depend on the type of car you drive, too. Adding different types of coverage -- such as collision -- if you buy a new car will increase your insurance premium as well.

Saving for a replacement vehicle
After we paid this car off four years ago, we kept putting $300 monthly into our savings account -- and we threw some extra cash in the bucket whenever we could -- until we had $10,000 saved up.

This was a painless way to save because our budget already accommodated the car payment, so to continue paying the same amount was pretty easy.

I've read about other methods, though, like adding varying amounts to your car account depending on how many miles you drive in a month: more miles = more money. I like this idea, too, because it encourages you to decrease your mileage. But it seemed like just another thing to think about, and I preferred the ease of an automatic payment withdrawal.

You could also just put extra, unexpected money into a savings account, such as, bonuses, raises, gifts, and so on like we did; but how often do you get extra, unexpected money? Since it is unreliable, it doesn't seem like it would amount to much as quickly as saving every month.

Then there is the method of not paying cash for vehicles at all. "We can make more by taking out car loans and then using the money we would have paid for the cars to gain better returns," a friend said recently. I am glad it works for her, but I dislike car loans way too much to enjoy that.

In a nutshell, this spreadsheet was very helpful to clarify what we wanted or needed. I confess to feeling overwhelmed when I think about what we'll buy next, so this spreadsheet will be the first step to trying to find the right vehicle. This research also showed me that $10,000 is probably not going to be enough, so we will be considering other sources to add to our savings account as well.

I hope our car keeps on rolling for many more miles.

This article originally appeared on Get Rich Slowly.

You may also enjoy these financial articles:

Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.