I would think it would fall under that $250/500k single/married rule, but for something like this I would talk to a CPA when you file your taxes to be sure.
@Steve Neuman ,
I am sorry for your loss. Sometimes those losses actually put you in a better financial position if no personal harm was done. Hopefully, that was the case with you.
Regarding your tax question.
The gain related to a primary residance portion of the duplex is sheltered via section 121 gain exclusion.
The rented portion of the duplex will not fall under section 121 250/500k exclusion. However, you can actually defer the gain realized (If any, there might not be any gain sometimes even if you have extra cash after payoff) on the rental portion with the section 1033 know as an involuntary conversion since the property was a total loss.
To completely defer the gain on the rented portion of the duplex, you need to acquire property that is similar or related in service or use to the original property that costs at least as much as the amount realized upon conversion (e.g., insurance proceeds).
It does not mean that you have to actually spend the insurance proceeds related to a rental portion of a duplex, the replacement property must cost as much the proceeds but can be acquired via a mortgage.
The replacement period begins on the earlier of
(1) the date the property is disposed of, or
(2) the date of the threat or imminence of requisition or condemnation of the property. (Not applicable to you)
It generally ends two years after the close of the tax year any gain is realized( not recognized).
Might be worth talking to qualified professional. Good luck.