Investors & landlords

Agreed ... since you HAD to be depreciating the property while it was a rental then you HAD to have calculated the % of the property basis belonged to the rental unit.  So if you decided that 25% was rental when you placed the asset into service then 25% of the sales price and cost of sale belongs to the rental.  

 

If you never depreciated the rental then you REALLY need to find local professional assistance to fix this error correctly ... this is not a  DIY  project.