Gain on a sale: amount realized and adjusted basis
Rule us-fed.irc.gain-and-adjusted-basis
Gain on a sale is the amount realized less adjusted basis; a loss is the reverse. The amount realized is money plus the fair market value of property received, and generally includes liabilities the sale discharges, such as a mortgage the buyer assumes or a nonrecourse loan the property is sold subject to. Costs paid to facilitate the sale, such as commissions, reduce the amount realized and are not deducted or added to basis; a dealer in property deducts them. Adjusted basis is the basis, generally cost, raised by capital expenditures and lowered by depreciation: the amount allowable, claimed or not, or a larger amount allowed that reduced tax.
26 U.S.C. 1001(a) and (b), 1011(a), 1012(a) and 1016(a)(1) and (2); 26 CFR 1.263(a)-1(e) and 1.1001-2(a); IRS Publication 544Sources checked AI-drafted