Sometimes if I was confused while studying I would look up IRS publications. The IRS actually tries to write things in plain English, because they want you to pay your taxes properly. Note, they don't use the word “boot” but “money received.” So, normally you'd always have a realized gain, since you're comparing the adjusted basis of your property with the fair market value of what you get. What you pay taxes on is the smaller of the realized gain OR the “icing on the cake,” the extra “money” the other person throws in offset by the extra “money” you throw in. Note that when they assume your mortgage it is “extra money” but never negative if the mortgage you assume is bigger than the mortgage they assume. (TRICK question if your realized gain is smaller (even zero) compared to the recognized gain limit).
From https://www.irs.gov/publications/p544/ch01.html#en_US_publink100072371 :
The recognized (taxable) gain on the disposition of the like-kind property you give up is the smaller of two amounts. The first is the amount of gain realized. See Gain or Loss From Sales and Exchanges, earlier. The second is the limit of recognized gain. To figure the limit on recognized gain, add the money you received and the fair market value of any unlike property you received. Reduce this amount (but not below zero) by any exchange expenses (closing costs) you paid. Compare that amount to your gain realized. Your recognized (taxable) gain is the smaller of the two.
Example.
You exchange real estate held for investment with an adjusted basis of $8,000 for other real estate you now hold for investment. The fair market value (FMV) of the real estate you received was $10,000. You also received $1,000 in cash. You paid $500 in exchange expenses.
FMV of like-kind property received $10,000
Cash 1,000
Total received $11,000
Minus: Exchange expenses paid (500)
Amount realized $10,500
Minus: Adjusted basis of property you transferred (8,000)
Realized gain $2,500
Although the total gain realized on the transaction is $2,500, the recognized (taxable) gain is only $500, figured as follows.
Money received (cash) $1,000
Minus: Exchange expenses paid (500)
Recognized gain $500
Assumption of liabilities. For purposes of figuring your realized gain, add any liabilities assumed by the other party to your amount realized. Subtract any liabilities of the other party that you assume from your amount realized.
For purposes of figuring the limit of recognized gain, if the other party to a nontaxable exchange assumes any of your liabilities, you will be treated as if you received money in the amount of the liability. You can decrease (but not below zero) the amount of money you are treated as receiving by the amount of the other party's liabilities that you assume and by any cash you pay, or unlike property you give up. For more information on the assumption of liabilities, see section 357(d) of the Internal Revenue Code and Regulations section 1.1031(d)-2.
Example.
The facts are the same as in the previous example, except the property you gave up was subject to a $3,000 mortgage for which you were personally liable. The other party in the trade agreed to pay off the mortgage. Figure the gain realized as follows.
FMV of like-kind property received $10,000
Cash 1,000
Mortgage assumed by other party 3,000
Total received $14,000
Minus: Exchange expenses (500)
Amount realized $13,500
Minus: Adjusted basis of property you transferred (8,000)
Realized gain $5,500
The realized gain is recognized (taxable) gain only up to $3,500, figured as follows.
Money received (cash) $1,000
Money received (liability assumed by other party) 3,000
Total money and unlike property received $4,000
Minus: Exchange expenses paid (500)
Recognized gain $3,500
Example.
The facts are the same as in the previous example, except the property you received had a fair market value (FMV) of $14,000 and was subject to a $4,000 mortgage that you assumed. Figure the gain realized as follows.
FMV of like-kind property received $14,000
Cash 1,000
Mortgage assumed by other party 3,000
Total received $18,000
Minus: Exchange expenses (500)
Amount realized $17,500
Minus: Adjusted basis of property you transferred (8,000)
Minus: Mortgage you assumed (4000)
Realized gain $5,500
The realized gain is recognized (taxable) gain only up to $500, figured as follows.
Money received (cash) $1,000
Money received (net liabilities assumed by other party):
Mortgage assumed by other party $3,000
Minus: Mortgage you assumed (4,000)
Total (not below zero) $0
Total money and unlike property received $1,000
Minus: Exchange expenses paid (500)
Recognized gain $500
Also you might want to fiddle with p. 2 of IRS form 8824 at https://www.irs.gov/pub/irs-pdf/f8824.pdf