I would seek sound legal or CPA advice as all say above.
But a few things you might bring up, not sure if they will pertain or not;
As mentioned above, expenses related to the cost of ownership should be deductible.
Insurance, yearly licensing taxes, maintenance, storage will real receipts, improvement costs, and perhaps more, ?
You might mention all this to whomever you confer with.
Like trades may play a part, kind of like in real estate which is a common in practice.
Sometimes, you have to step up to something worth at least $1.00 dollar more, there may be exceptions?
You may be able to "defer" some of the proceeds.
YOU, may not touch the money from the sale at that time, will have to be through an attorney.
Say your selling at 150K, add up your expenses you encountered, >>> hopefully with receipts>> and hold to present to your chosen tax person.
Find an investment vehicle >>> say worth 50K that you can live with and enjoy.
The chosen investment vehicle will be bought through your attorney with the sales money HE collected as your legal counsel, proceeds are then profit after the above deductions, and the attorney can wire or send a check in your name then.
Proceeds are then profit after the >>> above deductions for your tax person are figured in, CPA or ?
Lets say 150K, minus >>>500. to attorney, minus 40 years of deductions, $22,000, original purchase $1000. and 50K for new investment vehicle.
Maybe 75 K for tax base then ?
,
Would be good to start a new portfolio on the new investment automobile.
When you sell the NEW investment vehicle, taxes will then be fully due at current rates.
Run it past a CPA that has true knowledge, not a part time Jan-April tax office.
Hope all works out.
Respectfully,
john