What is included
Depreciation is the difference between what you pay and what the car is worth when you sell or trade it, and it is usually the biggest cost. Interest is what you pay the lender while you own the car. Running costs are insurance, fuel or charging, and maintenance and repairs, entered per year and multiplied by the years you own it.
With the defaults, a $32,000 car that keeps 45% of its value after five years loses $17,600. Financing $26,000 at 6.5% over 60 months costs about $4,523 in interest. Running costs of $4,400 a year add $22,000. The total is about $44,123, roughly $8,825 a year, $735 a month or $0.74 a mile at 12,000 miles a year.
Estimating resale value
Cars typically lose a large share of their value in the first few years. The resale percent is your estimate of the value at the end of ownership compared with the price you paid. Look up recent sale prices for the same model at the age and mileage you expect, and use a lower figure for high mileage or wear.
Keeping a car longer usually lowers the cost per year, because depreciation slows down over time, even though maintenance tends to rise. Try different ownership periods to see the effect.
Loans and early sale
If you sell before the loan is paid off, only the interest for the months you owned the car is counted; the remaining balance is paid from the sale and is not an extra cost here. If you pay cash, set the down payment equal to the price and the interest becomes zero.
The money you put down or pay in cash also has an opportunity cost, because it could have earned interest elsewhere. That is not included, so cash purchases may look slightly cheaper than they are.
What is not included
Registration renewals, parking, tolls, tires, and the cost of borrowing for repairs are not separate inputs. Add them to maintenance if they matter for your comparison. Sales tax and fees at purchase should be included in the price.
Fuel, insurance and repair costs change over time and vary widely by driver and location. Use your own quotes and records where you can, and treat the result as an estimate for comparing options rather than an exact forecast.