I assume the sale price was at fair value. you must recognize gain to the extent that the amount received before the repossession exceeds the gain already reported (IRC 1038). the repossession gain is limited to the initial gain on sale (as if no installment sale), reduced by gain already reported as income and any repossession costs.
your new basis equals the adjusted basis of the debt at the time of repossession, plus any repossession gain recognized., plus any repossession costs. the repossession gain retains the same character as the profit from the original sale.
here's an example
- payments received before repossession
- prior gain reported
- line 1 less line 2
- gross profit on sale - sales price less tax basis of property sold
- prior gain reported
- repossession costs + prior gain reported
- line 4 less line 6 (not less than zero)
- taxable gain (lesser of line 3 or 7)
- unpaid balance
- unrealized profit (line 9 times gross profit %)
- adjusted basis on the date of repossession line 9 less 10
- taxable gain from line 8
- repossession costs
- basis of repossessed property line sum of lines 11 through 13