Car sale and purchase

I have a vehicle that if I sell it, it will be more than what I paid for it.  If I sell it, and buy a new car within a certain time frame, do I still have to pay capital gain taxes?   If I were to trade the vehicle in towards a new one would I?  I don't believe so but I'm trying to see what my options are to avoid capital gains.

 

Thank you,
mcnally9250