Tax is calculated upon the taxable gain. Gain and Equity are two separate and distinct items. To determine your gain, identify your original purchase price, deduct any depreciation, which has been previously reported, then add the value of any improvements, which have been made to the property. The resulting figure will reflect your cost or tax basis. Your gain is then calculated by subtracting the cost basis from the net sales price.
Let us look at a basic concept, which applies to all exchanges. Utilize this concept to fully defer the capital gain taxes realized from the sale of a relinquished property:
1. The purchase price of the replacement property must be equal to or greater than the net sales price of the relinquished property, and
2. All equity received from the sale of the relinquished property must be used to acquire the replacement property.
3. Replace your debt.
To the extent that either of these rules is abridged, a tax liability will accrue to the Exchanger. If the replacement property purchase price is less, there will be tax. To the extent that not all equity is moved from the relinquished to the replacement property, there will be tax. This is not to say that the exchange will not qualify for these reasons; partial exchanges do in fact qualify for partial tax deferral. It simply means that the amount of any discrepancy will be taxed as boot, or non like-kind property.