How is sales tax applied to the sale price?

For example, If I make a deal to buy a new car for $50k and I have a trade-in worth $40k, do I only pay sales tax on the $10k difference?

My dilemma is that if they don’t give me a reasonable offer for my trade-in, just a few thousand dollar low-ball offer, I could end up paying that difference in sales tax if the above statement is true.

To state it a slightly different way; If I take the $50k deal and just make the minimum down payment until I can sell my current vehicle and pay down the loan, I may end up paying several thousand dollars more in sales tax.

7.25% tax on $45k = $3,262.50

7.25% tax on $10k = 725.00

I hope this is clear. Please reply and ask for clarification if not.