Having worked with numerous dealerships over the last 6 or so years, I'd say there are several things to consider when you decide to trade your car.
1. You're never going to get as much for your car when you trade it as you do when you sell it out right. These guys are in the business to make a profit and they are right to buy it for less than they are going to sell it for. It really all comes down to a numbers game, they may show you more on your trade, but they're going to take less off the sticker price.
2. Trading a vehicle is a convenience, but it also makes selling your car a lot easier. You don't have to worry about how long it will take to sell, nor do you have to worry about any potential liabilities associated selling a car to an indivdual (disclosures, etc.)
3. Once you've made the decision to trade, Make sure you're dealing with a reputable dealer. Avoid mailout gimics, if you're getting a prize for visiting the dealership, you're probably getting ripped off. If you get a check voucher that guarantees a certain amount for your car it's probably a gimic.
4. Ask for references, and make sure you research how much your cars trade value is on KBB, NADA, or Edmunds. You may or may not get what the website says it's worth after the dealership appraises the car, but it should give you a good reference point if you fairly answer the questions that these websites present. Also, check what the car is selling for on Cars.com and Autotrader.com, this could give you a great indication as to what the dealership can get for your vehicle.
5. Don't take a dirty car to the dealership! Remember, these guys are considering how much money they have to put into your car before they can sell, or wholesale your vehicle. If they're going to have to put an extra $200 into detailing your car, they're going to knock $300-$500 off what they're going to give you.
6. Be honest about your car. Honestly, is it in Excellent condition? Probably not. Don't go in expecting to get full retail for your car and pay wholesale for the dealerships. Again, it's a business and we need these guys to make money, but if you follow the guidelines above, you'll come out with a deal that's fair for both parties. The dealership makes some money and you can get a good deal all at the same time.
Hope this helps,