A capital gain is realized and taxed when you sell, exchange, or otherwise dispose of an asset for more than your adjusted basis, with the tax reported on the return for the year you receive the proceeds. Until that triggering event, any increase in value is a paper gain, and the IRS has no claim on it no matter how large it grows.
Paper Gains vs. Real Gains
Buy a stock at $50 and watch it climb to $70, and you have an unrealized gain of $20 per share. Your net worth is higher, but nothing is owed. The tax code treats the appreciation as a paper number because you still bear the risk of the price falling back tomorrow.
The rule is written directly into the Internal Revenue Code. Section 1001 calculates gain as the difference between what you realize from a sale or disposition and your adjusted basis in the property.1Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss No sale, no disposition, no gain to tax. The practical payoff is compounding: an investor who holds an appreciated position for twenty years pays nothing on the growth during that stretch. The bill comes due only at a realization event.
Events That Make a Gain Real
Selling for cash is the obvious trigger. You close on a rental property, the proceeds land in your account, and the gain is locked in. Several other events count too, and some catch people by surprise.
Exchanges
Swapping one asset for another is treated as selling the first and buying the second, even when no cash changes hands. Trading one cryptocurrency for a different cryptocurrency triggers realization, and the IRS has said so explicitly.2Internal Revenue Service. Frequently Asked Questions on Virtual Currency Transactions The same rule reaches barters of real estate, collectibles, and other property. Your gain is the fair market value of what you received minus your basis in what you gave up.
Foreclosures and Debt Relief
When a lender forecloses on property securing a debt, the IRS treats the discharged debt as part of the amount realized. If that amount exceeds your basis, you have a taxable gain even though nothing was voluntarily sold. Homeowners in financial distress often don’t see this coming.
Involuntary Conversions
Property destroyed by fire, stolen, or seized through condemnation can also produce a realized gain. If your insurance payout or condemnation award exceeds your basis, the excess is taxable.3Internal Revenue Service. Publication 544 (2025), Sales and Other Dispositions of Assets Reinvesting the proceeds in qualifying replacement property within the specified timeframe defers the gain, but pocketing the money makes it real in the year you receive it.4Internal Revenue Service. Involuntary Conversion – Get More Time to Replace Property
Constructive Sales
You can trigger realization without actually selling. Section 1259 treats certain hedging positions as if you sold the underlying asset outright. If you enter a short sale of the same stock you hold long, or lock in a delivery price on property you own through a futures contract, the IRS deems that a constructive sale of the appreciated position.5Office of the Law Revision Counsel. 26 USC 1259 – Constructive Sales Treatment for Appreciated Financial Positions A narrow exception applies if you close the hedge within 30 days after year-end and hold the original position at risk for another 60 days, but most investors who trip the rule end up paying.
When Realization Is Deferred or Skipped
Not every disposition produces an immediate tax bill. Congress carved out several ways to postpone or eliminate the gain.
Like-Kind Exchanges of Real Property
Section 1031 lets you swap one piece of investment or business real estate for another without recognizing the gain at the time of the exchange.6Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Since 2018, the deferral applies only to real property; equipment, vehicles, artwork, and cryptocurrency no longer qualify. If you receive cash or non-real-property on the side (called “boot”), you recognize gain up to that boot’s value. The rest of the gain isn’t forgiven, only deferred: your basis in the replacement property carries over, so a later sale without another exchange brings the full accumulated gain into income.
The Primary Residence Exclusion
Sell your main home and you can exclude up to $250,000 of gain from income, or $500,000 for married couples filing jointly. To qualify, you must have owned and lived in the home for at least two of the five years before the sale.7Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence You can use the exclusion once every two years. Unlike a 1031 exchange, this is permanent: the gain up to the cap simply drops out of your tax picture. The two years of use don’t have to be consecutive, though gain tied to periods of nonqualified use may still be taxable.
Installment Sales
When a buyer pays you over multiple years, the installment method spreads the gain across those years. Each payment carries a proportional slice of your total gain, calculated by dividing your gross profit by the total contract price.8Office of the Law Revision Counsel. 26 U.S. Code 453 – Installment Method Installment reporting is automatic for qualifying sales; you file Form 6252 each year until the final payment arrives. One catch: depreciation recapture is taxed in full in the year of sale, even before any payment has been received. The installment method spreads only the capital gain portion.
Realized This Year vs. Taxed This Year
Realization is the economic event. Recognition is when the gain shows up on a return. For most individuals, they line up because the cash method controls: income is reported in the tax year it’s received.9Office of the Law Revision Counsel. 26 USC 451 – General Rule for Taxable Year of Inclusion
Timing matters at year-end. Close a stock sale on December 31 with the cash hitting your brokerage account that day, and the gain belongs to that tax year. Sell property in late December under an installment agreement with the first payment arriving in January, and only that January portion is recognized in the new year. Getting the year wrong can bring an accuracy-related penalty of 20% of the underpayment.10Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments
How the Gain Is Taxed Once It’s Real
How long you held the asset determines the rate. The holding period begins the day after you acquire the asset and includes the day you dispose of it.11Internal Revenue Service. Publication 550 (2024), Investment Income and Expenses – Section: Holding Period Hold for one year or less and the gain is short-term, taxed at ordinary income rates. Hold for more than a year and it qualifies for the long-term rates. Timing a sale by a single day can shift thousands of dollars in liability.
Short-term gains for 2026 are taxed at the ordinary rates of 10%, 12%, 22%, 24%, 32%, 35%, and 37%, with the top rate applying to taxable income above $640,600 for single filers and $768,700 for married couples filing jointly.12Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026
Long-term gains use three preferential rates:
- 0% on taxable income up to $49,450 (single), $98,900 (joint), or $66,200 (head of household).
- 15% on taxable income above the 0% threshold up to $545,500 (single), $613,700 (joint), or $579,600 (head of household).
- 20% on taxable income above the 15% ceiling.
These thresholds are for tax year 2026.13Internal Revenue Service. Revenue Procedure 2025-32 – 2026 Adjusted Items
The Net Investment Income Tax
Higher earners face an additional 3.8% tax on net investment income, including capital gains. The surtax applies when modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers.14Office of the Law Revision Counsel. 26 U.S. Code 1411 – Imposition of Tax These thresholds are not indexed for inflation, so more taxpayers cross them each year. Combined with the 20% long-term rate, the effective top rate on long-term gains reaches 23.8%.
Basis Rules That Change the Size of the Gain
The gain equals what you realize minus your basis, so how you acquired the asset can matter as much as what you sell it for.
Inherited Property
When you inherit an asset, your basis is generally its fair market value on the date the previous owner died. This is the stepped-up basis.15Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If your parent bought stock for $10,000 decades ago and it was worth $100,000 at death, your basis is $100,000. Sell it the next day for $100,000 and you owe nothing. All of the appreciation during the decedent’s lifetime is erased for income tax purposes.
Gifted Property
Gifts work the other way. When someone gives you an asset during their lifetime, you inherit their basis. Your uncle bought land for $30,000 and hands it to you when it’s worth $80,000; your basis is still $30,000.16Office of the Law Revision Counsel. 26 U.S. Code 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Sell for $80,000 and you owe tax on a $50,000 gain. There’s a wrinkle for losses: if the fair market value at the time of the gift was below the donor’s basis, you use the lower value in calculating a loss, which prevents shifting built-in losses to a recipient in a higher bracket.
Reporting the Gain
Every sale or exchange of a capital asset goes on Form 8949, which reconciles what your broker reported to the IRS on Form 1099-B with what you report yourself.17Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets Totals from Form 8949 flow to Schedule D, where short-term and long-term gains and losses are netted to produce your overall capital gain or loss.18Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040)
Keep records of your purchase price, adjustments to basis (improvements, depreciation, reinvested dividends), and the dates of acquisition and disposal. Brokers track basis for stocks purchased after 2011, but older positions and non-covered securities are your responsibility. Installment sales require Form 6252 each year a payment arrives, until the obligation is fully paid. The IRS matches broker reports against filed returns, and mismatches are among the most common audit triggers for individual investors.