Whether tax is owed on a $400K home-sale net depends on filing status, ownership length, primary-residence use, and whether the exclusion was claimed recently.
Single filers could exclude up to $250K in gains; married joint filers up to $500K, if they met ownership, residency, and timing rules.
If a married couple qualified for the full exclusion, a $400K net would fall below it, so no capital gains tax would be owed.
If a single filer qualified, $150K of a $400K net could be taxable. At a 15% capital gains rate, tax would be $22.5K.
Without qualifying for the exclusion, the full $400K could be taxed. Holding the home >1 yr generally meant lower long-term rates.
Using sale proceeds to pay off another home did not determine tax. The key issue was meeting exclusion rules and how long the home was held.