I bought an investment property in the United States for $20k in 2005, got a $100k refi loan on it in 2007 and sold the property for $100k in 2018. When I sold the property in 2018, I owed about $80k on the principal from the refi loan.
Because I bought the property for $20k and sold it for $100k, my accountant says that the IRS considers this a capital gain of $80k, and that I'll have to pay taxes on that amount for 2018. However, because the mortgage principal was $80k at the time I sold, the amount of money I have in my pocket after the property sale is very small (the $20k difference between the loan balance and the sales price, minus Realtors' fees, repairs, etc. associated with the sale).
I'd like to avoid paying taxes on an extra $80k worth of income for 2018. One idea is to put as much money as possible into a retirement account. It wouldn't offset the whole tax liability because of retirement contribution limits, but it would help.
I know I could also offset property gains taxes from a real estate sale by reinvesting them in other real estate. That could also help, although I don't have $80k to invest, so I can't offset the entire tax liability this way.
Any other ideas?