CarBuy.exe allows you to calculate what a car dealer's cost on any vehicle is. Save data for vehicles you may be intereste in from Edmunds.com. Walk onto the lot and select the options your desired vehicle has. The program will calculate dealer cost. Select an appropriate profit percentage for the dealer(3-5%). The program will calculate the price you should pay for the vehicle. Enter tax rate, interest rate, term, trade-in value and any down payment, and the program will calculate monthly payments.
I have successfully used this to purchase 2 vehicles now. I just say I know exactly what you paid for this vehicle with these options and if you want to sell it today, I'm willing to pay "X" right now. One I got for 5% and the other for 6%(I weasled out).
This was tested on a Cassiopeia E-105 and written in C++.