What Is a Realized Gain and How Is It Taxed?

A realized gain is the profit you lock in when you sell or exchange an asset for more than your tax basis in it. The formula is simple: subtract your adjusted basis from the amount you received, and the difference is the gain. That number drives the rest of the tax picture, from the rate you pay to the forms you file. How a realized gain is taxed depends on how long you held the asset, what kind of asset it was, and whether any exclusion or deferral applies.

Realized vs. Unrealized

The difference comes down to whether you’ve actually sold. Buy 100 shares at $50 and watch the price rise to $75, and you’re sitting on a $2,500 unrealized gain. That gain exists only on paper. The price could drop back next week and wipe it out. Nothing is owed because nothing has happened yet to make the profit permanent.

The moment you sell, the gain becomes realized. The IRS taxes what you received in the sale, not what your account is worth on any given day. That’s why investors can hold large unrealized gains for decades without owing capital gains tax. The sale is the trigger.

This gives you some control over timing. Selling in a low-income year can mean a lower rate. Waiting until January instead of December pushes the tax into the following year. When you realize the gain is often the only lever you have.

How to Calculate a Realized Gain

Two components: the amount realized minus the adjusted basis. Positive result, realized gain. Negative, realized loss.

Amount Realized

The amount realized is everything you receive from the sale. Under 26 U.S.C. ยง 1001(b), that includes cash the buyer pays plus the fair market value of any property you receive in the exchange.1Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss It also includes any debt of yours that the buyer takes on. Sell a rental property with a $50,000 mortgage the buyer assumes, and that $50,000 counts as part of your amount realized, just as if the buyer had handed you the cash.2Internal Revenue Service. Publication 544 – Sales and Other Dispositions of Assets

Sellers often undercount by looking only at the cash that hit the bank account. Property swaps, debt assumptions, and any non-cash consideration all belong in the total.

Adjusted Basis

Your adjusted basis is what the IRS treats as your investment in the asset. For something you bought, the starting point is the purchase price plus acquisition costs such as broker commissions, transfer fees, and legal costs.3Internal Revenue Service. Topic No. 703 – Basis of Assets

From there, basis moves. Improvements that add value push it up. Spend $30,000 on a new roof for a rental, and basis rises by $30,000. Depreciation deductions you’ve claimed reduce basis. So do insurance reimbursements for casualty losses.4Internal Revenue Service. Publication 551 – Basis of Assets

Two situations come up often. Property received as a gift generally carries the donor’s adjusted basis, so the donor’s original cost and adjustments become your starting point. Property you inherit gets a stepped-up basis equal to the fair market value on the date of the decedent’s death, which effectively erases the gain that built up during the decedent’s lifetime.4Internal Revenue Service. Publication 551 – Basis of Assets

When the fair market value of a gifted asset is lower than the donor’s basis at the time of the gift, a dual-basis rule applies. You use the donor’s basis to figure any future gain, and the lower fair market value to figure any future loss. If the sale price falls between those two numbers, you recognize neither. The rule blocks people from transferring built-in losses by gift.

A Worked Example

Suppose you buy stock for $10,000, pay a $50 commission, and later sell for $15,200 with another $50 commission. Adjusted basis is $10,050. Amount realized is $15,150. Realized gain: about $5,100. That’s the figure that goes on your return.

When a Realized Gain Is Actually Taxed

The default federal rule is blunt: the entire realized gain is taxable in the year of the sale.1Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss The tax code calls this “recognition.” A recognized gain is the portion of the realized gain that actually hits your return. Usually the two numbers match. A few provisions let you defer or exclude the gain.

Like-Kind Exchanges

Under Section 1031, you can swap one piece of investment or business real estate for another of “like kind” without recognizing the gain. The gain doesn’t vanish. It gets built into the replacement property through a lower basis, and it comes due when you eventually sell the replacement in a regular taxable sale.5Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment This applies to real property only. Stocks, equipment, and personal property don’t qualify.

Home Sale Exclusion

Sell your primary residence at a gain and you can exclude up to $250,000 from income, or $500,000 for married couples filing jointly. You must have owned and used the home as your principal residence for at least two of the five years before the sale.6Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain from Sale of Principal Residence The two years don’t have to be consecutive; they just need to total 24 months inside that five-year window. For joint filers, both spouses must meet the use requirement, but only one needs to meet ownership.7Internal Revenue Service. Publication 523 – Selling Your Home The exclusion can be claimed only once every two years. Unlike a 1031 exchange, it eliminates the gain permanently rather than deferring it.

Involuntary Conversions

When property is destroyed by fire, stolen, or seized by the government, and insurance or condemnation proceeds exceed your basis, you have a realized gain. You can defer that gain by reinvesting the proceeds in qualifying replacement property within the required time frame.8Internal Revenue Service. Involuntary Conversion – Get More Time to Replace Property As with a 1031 exchange, the deferred gain lowers the basis of the replacement property.

Tax Rates on Realized Gains

The rate on a recognized gain depends on two things: how long you held the asset, and what kind of asset it was.

Short-Term

Assets held one year or less produce short-term capital gains, taxed at your ordinary income tax rates.9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses For 2026, those rates run from 10% to 37%, with the top rate applying to taxable income above $640,600 for single filers and $768,600 for married couples filing jointly. No special break here. Short-term gains are treated like wages.

Long-Term

Assets held more than one year qualify for preferential long-term rates. For 2026:

  • 0% on taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household)
  • 15% from those thresholds up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household)
  • 20% above those amounts

The gap between short-term and long-term rates is substantial. An investor in the 37% ordinary bracket who holds one extra day past the one-year mark can cut the top rate on the gain nearly in half. That’s why holding period matters so much.

Special Categories

Not every long-term gain gets the standard 0/15/20% treatment. Collectibles such as art, coins, and antiques are taxed at a maximum rate of 28%, even if held for decades.9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses That catches people who inherit or sell a coin collection.

Depreciable real estate has its own wrinkle. The portion of the gain attributable to depreciation deductions you previously claimed is “recaptured” and taxed at a maximum rate of 25% instead of the lower long-term rates.9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses Any remaining gain above the recaptured depreciation gets the standard long-term rate.

Net Investment Income Tax

High earners face an additional 3.8% surtax on net investment income, including realized capital gains. The tax applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 for single filers, $250,000 for joint filers, or $125,000 for married filing separately.10Internal Revenue Service. Topic No. 559 – Net Investment Income Tax Those thresholds are not indexed for inflation. Add the 3.8% to the 20% long-term rate and the effective top federal rate on long-term gains reaches 23.8%.

Offsetting Gains With Losses

Realized losses are the counterweight. Sell an asset for less than your basis and you have a capital loss, which the IRS lets you use to reduce tax in a specific order.

Short-term losses offset short-term gains first, and long-term losses offset long-term gains. Any net loss left in one category crosses over to the other. If total capital losses still exceed total capital gains, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if married filing separately.9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses Anything beyond that carries forward indefinitely, so a big loss can reduce your taxes for years.

Watch out for the wash sale rule. Sell a security at a loss and buy the same or a substantially identical security within 30 days before or after, and the IRS disallows the loss. The disallowed amount gets added to the basis of the replacement shares, so it isn’t gone forever, but you can’t use it right away.

Reporting and Estimated Taxes

Every sale of a capital asset gets reported on Form 8949, which separates transactions into short-term and long-term.11Internal Revenue Service. Instructions for Form 8949 The totals flow onto Schedule D of Form 1040, where gains and losses are netted and the tax is calculated.12Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) Your broker will send Form 1099-B (or 1099-DA for digital assets) showing proceeds and, in most cases, cost basis.

A large gain mid-year can create an estimated tax obligation that catches people off guard. If you expect to owe $1,000 or more after subtracting withholding and credits, and withholding won’t cover at least 90% of your current-year tax or 100% of last year’s (110% if your prior-year AGI exceeded $150,000), you’re generally required to make quarterly estimated payments.13Internal Revenue Service. Form 1040-ES – Estimated Tax for Individuals Missing them triggers an underpayment penalty that works like interest on the amount you should have paid.14Internal Revenue Service. Topic No. 306 – Penalty for Underpayment of Estimated Tax If you’re a W-2 employee who sold a big asset, one workaround is to file a new W-4 and raise your withholding for the rest of the year rather than deal with quarterly vouchers.

State tax adds another layer. Most states tax capital gains as ordinary income with no preferential rate. Between federal tax, the net investment income tax, and state tax, a high-income investor selling a short-term asset in a high-tax state can face a combined marginal rate above 50%. Run the numbers before you sell.