Deductions & credits

I think you need to review your tax situation as to whether you're a real estate investor or dealer. investors gets capital gain treatment.  dealers get ordinary income treatment.

https://www.marcumllp.com/insights/dealer-vs-investor-what-factors-are-considered-and-why-it-matters