It's almost impossible to make sure you get the best possible deal with used cars, as opposed to new cars. In the case of a dealer especially, you just can't tell how much they might have paid for the car. It might have been $1000 below KBB wholesale, or it might have been close to the private party value if the guy was upside down and the dealer was generous enough to bail him out.
The best you can do in most cases is good old-fashioned back and forth. Set a price at which you would absolutely, positively buy the car, and try to get the other guy to compromise.