Sale of depreciable real estate

Purchased house for $104000, in Nov 1993, added $16000 improvements. Sold in Sept 2022 for $408000 (net) Had a deferred gain from previous 1031 of $66000 and TurboTax showed 2021 accumulated depreciation of $82000. (2022 depreciation of only Subtracting the deferred gain, and accumulated depreciation gives a negative Adjusted Basis of $28000, resulting in Cap Gains of $408000+($28000)= $436000, correct?

Must I use the negative Adjusted Basis or do I treat the negative basis as a zero? 

Is there a worksheet that I can use to figure this out?

Thanks for your help,