Carl
Level 15

Investors & landlords

Since you will not have lived in the property as your primary residence for at least two years (730 days) of the last 5 years (1826 days) you owned it, counting back from the closing date of the sale, you do not qualify to exclude any realized gain on the sale from being taxed.  But you still have a problem that will require a tax professional to deal with properly.
Your property improvements should have been added to your cost basis and depreciated from the time they were placed in service. Apparently, you didn't do that. A tax pro can help you get this corrected and keep your fines and penalties to a minimum, if not completely negate them.