ACCT-351 · Lesson 10 of 12 · 25 min
Capital gains II: home sales, gifts, inheritances and like-kind exchanges
For most American families, the largest gain they will ever realize is on their home, and that gain is usually tax-free under section 121. This lesson begins with that exclusion: who qualifies, how the ownership and use tests work, and what happens when a home was rented before or after the owners lived in it. It then turns to two transfers that do not trigger tax but determine the basis the recipient takes: gifts, where the donor's basis carries over, and inheritances, where basis is stepped up to fair market value at death. It ends with like-kind exchanges of real estate and involuntary conversions, two ways to defer gain when property is replaced.
The home sale exclusion
Section 121 lets a taxpayer exclude up to $250,000 of gain ($500,000 for most married couples filing jointly) on the sale of a principal residence. To qualify, the taxpayer must have owned the home and used it as a principal residence for periods totaling at least two years during the five years ending on the date of sale, and must not have used the exclusion on another sale in the previous two years. For the $500,000 joint exclusion, either spouse can meet the ownership test, but both must meet the use test. The two years need not be continuous: a person who lived in the home for 24 months in total over the five years qualifies. The exclusion amounts were set in 1997 and have never been indexed, so in high-cost housing markets a growing number of long-time owners now have gains above the limits.
A home that does not meet the two-year tests may still qualify for a reduced maximum exclusion if the sale is due to a change in place of employment, health or other unforeseen circumstances, such as a death, divorce, job loss or multiple births. The reduced maximum is the full exclusion multiplied by the fraction of the two years for which the tests were met. The gain excluded is the gain on the residence; land sold separately within two years can be included, but a vacation home that was never the taxpayer's principal residence does not qualify.
Two limits reduce the exclusion when a home was not always used as a principal residence. First, gain equal to depreciation claimed after 6 May 1997, for example on a home office or on a period of rental, cannot be excluded and is taxed as unrecaptured section 1250 gain at up to 25 percent. Second, since 2009 the gain allocated to periods of nonqualified use, broadly periods when neither the taxpayer nor the spouse used the home as a principal residence, is not excludable. Nonqualified use does not include any period after the last date the home was used as a principal residence, so a taxpayer who moves out and rents the home for up to three years before selling can still exclude the gain, other than depreciation. Losses on the sale of a personal residence are not deductible.
Applying the exclusion
The program below applies the exclusion to a hypothetical 2026 sale of the Brandts' house, which they bought in 2011, at its estimated current value, then shows the reduced maximum exclusion for a person who must move for a new job after 15 months, and finally compares the basis of shares Leah might receive from her father by gift and by inheritance.
# Home sale exclusion and the basis of gifted and inherited property (illustrative)
# 1. A hypothetical 2026 sale of the Brandts' Des Moines house, bought in 2011
price, selling_costs, basis = 560_000, 31_000, 310_000 + 24_000 # basis includes improvements
gain = price - selling_costs - basis
exclusion = min(gain, 500_000) # married filing jointly
print(f"Main home gain {gain:,}; excluded {exclusion:,}; taxable {gain - exclusion:,}")
# 2. Reduced exclusion: a single owner moves for a new job after 15 months
months_owned_and_used, max_excl = 15, 250_000
reduced = max_excl * months_owned_and_used / 24
print(f"Reduced maximum exclusion after 15 months: {reduced:,.0f}")
# 3. Shares from Leah's father: inherited versus gifted before death
father_basis, fmv_at_transfer, later_sale = 20_000, 90_000, 95_000
for how, b in [("inherited (sec. 1014 step-up)", fmv_at_transfer),
("gifted (sec. 1015 carryover)", father_basis)]:
print(f"Sold for {later_sale:,} after being {how}: basis {b:,}, gain {later_sale - b:,}")Main home gain 195,000; excluded 195,000; taxable 0 Reduced maximum exclusion after 15 months: 156,250 Sold for 95,000 after being inherited (sec. 1014 step-up): basis 90,000, gain 5,000 Sold for 95,000 after being gifted (sec. 1015 carryover): basis 20,000, gain 75,000
If they sold, the Brandts' gain of $195,000, after selling costs and $24,000 of improvements added to basis, would be far below the $500,000 joint exclusion, so none of it would be taxed. If the sellers certify to the closing agent that the whole gain is excludable, no Form 1099-S is issued and the sale need not be reported; otherwise they report it and claim the exclusion. A single person who sells after 15 months because of a job transfer qualifies for a reduced maximum of 15/24 of $250,000, or $156,250, which may still cover the whole gain. The gift and inheritance comparison is the subject of the next section.
Gifts: carryover basis
When property is given away, the donor recognizes no gain or loss, and section 1015 gives the donee the donor's adjusted basis, a carryover basis, with the donor's holding period tacked on. The recipient therefore inherits the donor's unrealized gain and pays tax on it when they sell. If the property's value at the time of the gift is lower than the donor's basis, a dual basis rule applies to stop the shifting of losses: for computing a loss, the donee's basis is the lower fair market value at the date of the gift; for computing a gain, it is the donor's basis; and a sale at a price between the two produces neither gain nor loss. Gift tax paid on the appreciation is added to basis.
Federal gift tax applies to gifts above an annual exclusion of $19,000 per recipient for 2026 ($38,000 for a married couple splitting gifts), but tax is only payable after the donor's lifetime exemption, unified with the estate tax exemption and set at $15,000,000 for 2026 by the 2025 act, is used up. Gifts above the annual exclusion require a gift tax return, Form 709, even when no tax is due. Very few families pay gift or estate tax; for most, the income tax basis rules matter far more than the transfer taxes.
Inheritances: stepped-up basis
Under section 1014, property acquired from a decedent takes a basis equal to its fair market value at the date of death, or at the alternate valuation date six months later if the estate elects it to reduce estate tax. All gain accrued during the decedent's lifetime therefore escapes income tax permanently, and any decline in value is also lost. In community property states, both halves of community property receive a new basis when the first spouse dies. Inherited property is always treated as held for more than one year. The step-up does not apply to income in respect of a decedent, such as balances in traditional IRAs and 401(k)s, unpaid wages and installment obligations; these remain taxable to the beneficiaries as they are received.
The step-up at death is one of the largest tax expenditures in the federal system, because it means that much of the growth in value of assets held until death is never taxed. Proposals to tax gains at death or to limit the step-up have been made several times but not enacted. Its effect on planning is strong: elderly owners of highly appreciated property often hold it until death rather than selling or giving it away, because a gift would pass on the low basis while a bequest wipes out the gain. Estate tax, for the few estates large enough to owe it, is a separate tax on the value of the estate above the $15,000,000 exemption.
| How the property is acquired | Recipient's basis | Holding period |
|---|---|---|
| Purchase | Cost | Starts the day after purchase |
| Gift, value above donor's basis | Donor's basis (plus gift tax on appreciation) | Includes the donor's period |
| Gift, value below donor's basis | Donor's basis for gains; FMV at gift for losses | Depends on which basis is used |
| Inheritance | FMV at death (or alternate valuation date) | Always long-term |
| Transfer from a spouse or incident to divorce (s. 1041) | Transferor's basis; no gain recognized | Includes the transferor's period |
| Like-kind exchange (s. 1031) | Basis of property given up, adjusted for boot and gain recognized | Includes the old property's period |
Worked problem
A like-kind exchange with boot
Leah's father owns a small commercial building held for investment with an adjusted basis of $300,000 and a value of $900,000. He exchanges it through a qualified intermediary for a rental apartment building worth $820,000 plus $80,000 of cash. What gain is recognized, and what is the basis of the new building?
Show solution
- Realized gain: $900,000 − $300,000 = $600,000.
- Cash received is boot, so gain is recognized up to $80,000.
- Deferred gain: $520,000.
- Basis of the new building: $300,000 basis given up + $80,000 gain recognized − $80,000 cash received = $300,000, which equals its $820,000 value minus the $520,000 deferred gain.
- He must identify the replacement property within 45 days and complete the exchange within 180 days.
Answer: $80,000 recognized, $520,000 deferred, new basis $300,000.
Like-kind exchanges and involuntary conversions
Section 1031 lets a taxpayer defer gain when real property held for productive use in a business or for investment is exchanged for other like-kind real property. Since 2018, only real property qualifies; exchanges of equipment, vehicles, artwork or digital assets no longer do. Almost any real estate is like-kind to any other US real estate: raw land for an apartment building, a warehouse for a rental house. Most exchanges are deferred exchanges through a qualified intermediary, who holds the sale proceeds: the taxpayer must identify replacement property within 45 days of the sale and acquire it within 180 days. Cash or other property received, called boot, triggers gain up to its value, and so does net debt relief. The replacement property takes a substituted basis, so the deferred gain is preserved and taxed when that property is later sold, unless it is held until death and stepped up.
Section 1033 gives similar deferral when property is destroyed, stolen, condemned or sold under threat of condemnation, and the taxpayer reinvests the proceeds in similar property within two years (three years for condemned business real estate, four for a main home in a federally declared disaster area). Gain is recognized only to the extent the proceeds are not reinvested.
Common mistakes
MistakeExcluding gain on a vacation home.
InsteadOnly a principal residence meeting the two-year tests qualifies.
MistakeExcluding gain attributable to depreciation on a home office.
InsteadDepreciation after 6 May 1997 is taxed as unrecaptured section 1250 gain.
MistakeAssuming gifted property gets a stepped-up basis.
InsteadGifts carry over the donor's basis; only property acquired from a decedent is stepped up.
MistakeThinking traditional IRAs get a stepped-up basis.
InsteadIRA balances are income in respect of a decedent, taxed to beneficiaries.
MistakeDoing a like-kind exchange of equipment.
InsteadSince 2018 only real property qualifies under section 1031.
Summary and key terms
- Section 121 excludes $250,000 ($500,000 joint) of gain on a home owned and used for 2 of the last 5 years.
- A reduced exclusion is available for moves due to work, health or unforeseen circumstances.
- Depreciation and periods of nonqualified use reduce the excludable gain.
- Gifts carry over the donor's basis, with a dual basis rule for losses.
- Inherited property takes a basis equal to fair market value at death.
- IRD items such as IRAs do not get a stepped-up basis.
- Like-kind exchanges of real property defer gain; boot triggers gain; the 45- and 180-day deadlines are strict.
- Gift and estate tax apply only above a $15,000,000 lifetime exemption for 2026.
- Carryover basis
- A basis equal to the transferor's basis, used for gifts.
- Stepped-up basis
- A basis equal to fair market value at death, used for inherited property.
- Income in respect of a decedent
- Income the decedent earned but had not received, such as IRA balances, taxable to the recipient.
- Like-kind exchange
- A section 1031 exchange of real property held for business or investment, deferring gain.
- Boot
- Cash or other non-like-kind property received in an exchange, which triggers gain.
- Nonqualified use
- A period after 2008 when a home was not used as a principal residence, reducing the section 121 exclusion.
- Fair market value
- The highest price obtainable in an open market between informed, willing parties at arm's length.
Practice problems
Work each problem on paper first, then reveal the answer to check.
A married couple has a $620,000 gain on their home of 20 years. How much is taxable?
Show answer
$120,000, the amount above the $500,000 exclusion.
In the program, change the selling price to $900,000. What is taxable?
Show answer
Gain $535,000; $35,000 is taxable.
Leah's colleague moves away and rents the house for two years before selling. Can he still exclude the gain?
Show answer
Yes, if he met the two-out-of-five-year tests at the date of sale; rental after the last use is not nonqualified use, but depreciation taken is taxable.
Shares worth $40,000 with a basis of $50,000 are given to Nora and later sold for $45,000. What is the result?
Show answer
No gain or loss: the price is between the $40,000 loss basis and the $50,000 gain basis.
What is the 2026 annual gift tax exclusion?
Show answer
$19,000 per recipient.
Why do elderly owners of appreciated property often keep it until death?
Show answer
Inherited property is stepped up to fair market value, eliminating the accrued gain.
What are the deadlines in a deferred like-kind exchange?
Show answer
45 days to identify and 180 days to complete.
Is a rental apartment exchanged for raw land held for investment like-kind?
Show answer
Yes; both are real property held for business or investment.
What is income in respect of a decedent?
Show answer
Income the decedent had earned but not received, such as IRA balances, taxable to recipients without a step-up.
What gain is recognized when boot of $50,000 is received in an exchange with a $200,000 realized gain?
Show answer
$50,000; the rest is deferred.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.