I don't understand how to calculate gain/loss on a vehicle traded in used part-time for business. Does purchase price include the trade-in allowance?

Total purchase price of car traded in $16733.  I paid $12733 with my trade-in.  Depreciation of $4978.  The dealer gave me a $10,000 trade-in allowance for it.