TP lived in rental.
TP lived in duplex 3 of last 5 yrs. How to allocate gain? Investment portion vs principle home.
TP lived in duplex 3 of last 5 yrs. How to allocate gain? Investment portion vs principle home.

I think you are stating this is a duplex, where taxpayer lives in half and rents out half. He should have been reporting on schedule E the half of the property that he has been renting out. This sale of the rental will be reported on Form 4797. If you have the asset worksheets, you fill in date disposed. then in same section of each asset worksheet you allocate the sales price and expenses of sale to land and to each asset.
I would use a worksheet allocating on the basis of the adjusted basis of each asset (after depreciation to date)
On the sale of home there is a sale of home worksheet that you report the sale of the home answer the questions and get the 250,000, 500,000 exclusion.

The depreciation worksheet should show the allocated cost and adjusted basis of the rental portion of the property. If the land value is not shown, simply apportion it in the same ratio as
the buildings. Use the same ratio for the selling price and selling expenses.
Thanks for your helpful answer. I was hoping you would answer my question; you always have good answers without being condescending.
TP has been using Sch E each year for the rental portion. Now that the property has sold, can I show the investment % of cost & sale price on the asset worksheet to flow to 4797 & recapture depreciation; the other % will be on home sale worksheet? The last year was totally rental, so I'll have to work out the overall %.