One thing to keep in mind, if your trade in has significant value, is that your trade in amount reduces the tax you pay on the new price. For example, if you buy a $25000 car, and have a trade in value of $10000, you only pay tax on $15000.
That also assumes the dealer doesn't rip you off on the trade in, which is pretty rare. Selling the car yourself for cash is pretty much always better, even if you aren't a slick salesman type.