Tesla has a self evaluation process if you want to take advantage of it. You fill out the forms, take pictures of your car (they specify what they want), and you get a tentative offer. If you turn in the car in essentially that condition, with some constraint on the addition mileage (I think it's 500 miles), you get that as a credit.
I went that route, but was not particularly taken with their offer on my BMW. I took the BMW to the BMW dealer, who offered me more and bought it. That will be tougher with a Tesla as you don't have a dealer to compete against Tesla. But you will have a good idea what Tesla will give you and you can sell it yourself if you get a better offer.
Make sure its a much better offer though, because a trade usually reduced the sales price used to calculate the sales tax. So a trade in tends to be more powerful financially than selling for the same price elsewhere.