The car you already have is part of the deal
Trade-in is the convenient option, not usually the best one.

Most buyers treat their current car as an afterthought and hand it over at whatever is offered. It is often a fifth of the transaction.
The trade-in number and the new car number are separate negotiations, and they get blended deliberately. A generous trade allowance beside a firm price is the same money as a strong price beside a poor allowance. Ask for both figures and evaluate them separately.
Understand the spread. A dealer buys your car to sell it, so the offer reflects what it will cost to recondition and how long it will sit. Selling privately generally recovers more, and costs you time, strangers, and the administration of a title transfer.
In between sit the instant-offer buyers, who will quote online and buy the car outright. Their number is usually better than a trade allowance and worse than a good private sale, with almost none of the effort. Getting one costs nothing and gives you a floor to negotiate against.
Two practical notes. Know your payoff figure if the car is financed, and know it precisely, because the difference between payoff and value is what actually changes hands. And in California there can be a sales tax advantage to trading in rather than selling separately — worth checking against your numbers, because on a large trade it can offset much of the gap.