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: amount realized minus adjusted basis. If that number is positive, it is your realized gain, and the federal default is that the entire amount is taxable in the year of the sale. How much tax you owe depends on how long you held the asset, what kind of asset it was, and whether a deferral or exclusion rule applies.
Realized Gain vs. Unrealized Gain
The difference comes down to whether you have actually sold. If you bought 100 shares at $50 and the price climbs to $75, you are sitting on a $2,500 unrealized gain. That gain exists only on paper. The price could fall back next week and erase it. You owe no tax, because nothing has happened yet to make the profit permanent.
The moment you sell, the gain becomes realized. The IRS taxes what you actually received when you closed the deal, not what your portfolio is worth today. Investors can hold enormous unrealized gains for decades without owing a dime in capital gains tax. The sale is the trigger.
This is why timing matters. Selling appreciated assets in a low-income year can drop your rate. Waiting until January instead of December pushes the bill into the next tax year. The realization event is one of the few things you control.
How to Calculate a Realized Gain
Two numbers do the work: the amount realized and your adjusted basis. Subtract the second from the first. A positive result is a realized gain; a negative result is a realized loss.
Amount Realized
The amount realized is everything you receive from the sale. Under 26 U.S.C. ยง 1001(b), that includes any 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. If you sell a rental property and the buyer assumes your $50,000 mortgage, that $50,000 counts as part of your amount realized, just as if the buyer had handed you cash.2Internal Revenue Service. Publication 544 – Sales and Other Dispositions of Assets
Sellers sometimes undercount because they look only at the cash that hit the bank account. Property swaps, debt assumptions, and any non-cash consideration all get added in.
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 over time. Improvements that add value push it up. Spend $30,000 on a new roof for a rental property and your basis rises by $30,000. Depreciation deductions you have claimed reduce basis, and so do insurance reimbursements for casualty losses.4Internal Revenue Service. Publication 551 – Basis of Assets
Two special situations come up often. Property received as a gift generally carries the donor’s adjusted basis, so the donor’s original cost and any adjustments they made become your starting point. Inherited property works differently: you receive a stepped-up basis equal to the asset’s fair market value on the date of the decedent’s death, which effectively erases the unrealized gain 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, but the lower fair market value to figure any future loss. Sell at a price between those two numbers and you recognize neither gain nor loss. The rule exists to stop people from transferring built-in losses by gift to generate deductions.
A Simple Example
Suppose you bought stock for $10,000 and paid a $50 commission, then sold it later for $15,200 with another $50 commission. Your adjusted basis is $10,050. Your amount realized is roughly $15,150 after the selling commission. The realized gain is about $5,100. That is the figure you report.
When a Realized Gain Is Taxable, and When It Is Not
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 lands on your return. In most cases the two numbers are identical. A handful of provisions let you defer the gain, and one lets you exclude it outright.
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 at the time of the exchange. The gain does not vanish; it gets baked into the replacement property through a lower basis, and it comes due when you eventually sell the replacement in a taxable sale.5Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment This works only for real property. Stocks, equipment, and personal property do not qualify.
Home Sale Exclusion
Sell your primary residence at a gain and you can exclude up to $250,000 of that gain from income, or $500,000 for a married couple 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 need not be consecutive; they just need to add up to 24 months inside that five-year window. For joint filers, both spouses must meet the use test, but only one needs to meet the ownership test.7Internal Revenue Service. Publication 523 – Selling Your Home
You can claim the exclusion only once every two years. Unlike a 1031 exchange, this one permanently eliminates the gain rather than deferring it. For most homeowners it is the single most valuable tax break they will ever use.
Involuntary Conversions
When property is destroyed by fire, stolen, or seized by the government and the 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 reduces the basis of the replacement property.
Tax Rates on Realized Gains
The rate on a recognized gain turns on two things: how long you held the asset and what kind of asset it was. Getting the classification right is where the real money is.
Short-Term Capital Gains
Assets held for one year or less produce short-term gains, taxed at ordinary income 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. There is no preferential break here. A short-term gain is treated the same as wages.
Long-Term Capital Gains
Hold an asset for more than one year and the gain qualifies for the 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% on taxable income above those thresholds up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household)
- 20% on taxable income above those amounts
The gap between short-term and long-term rates is large. An investor at the 37% top ordinary rate who holds one extra day past the one-year mark cuts the top rate on the gain nearly in half. This is why tax advisors focus so hard on holding periods.
Collectibles, Depreciation, and Small Business Stock
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 is higher than most investors expect, and it catches people off guard when they sell a coin collection inherited from a parent.
Gains on depreciable real estate carry a separate wrinkle. The portion of the gain attributable to depreciation you previously claimed is “recaptured” and taxed at a maximum rate of 25% rather than the lower long-term rates.9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses The rule keeps landlords from taking ordinary income deductions for depreciation for years and then paying a preferential rate on the way out. Any remaining gain above the recaptured depreciation gets the standard long-term rate.
On the other end, gains from qualified small business stock held for more than five years may be entirely excluded from federal income tax under Section 1202, subject to a per-issuer cap of the greater of $10 million or ten times the stock’s adjusted basis. The eligibility rules are narrow: the stock must be in a domestic C corporation with gross assets under $50 million at the time of issuance.
Net Investment Income Tax
High earners face an additional 3.8% surtax on net investment income, capital gains included. The tax applies to the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately).10Internal Revenue Service. Topic No. 559 – Net Investment Income Tax These thresholds are not indexed for inflation, so more taxpayers cross them each year. Add the 3.8% to the 20% long-term rate and the effective top federal rate on long-term gains hits 23.8%.
Offsetting Gains With Capital Losses
Realized losses are the natural counterweight. Sell an asset for less than your adjusted basis and you have a capital loss that can reduce your tax bill in a set order.
Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. Any net loss left in one category then crosses over to offset gains in the other. If total capital losses still exceed total capital gains after netting, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).9Internal Revenue Service. Topic No. 409 – Capital Gains and Losses Anything beyond that carries forward to the next year indefinitely, so a big loss now can shelter gains for years.
One trap catches investors every year. Under the wash sale rule, if you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss. The disallowed amount is added to the basis of the replacement shares, so it is not gone forever, but you cannot use it right away. Investors harvesting losses while trying to keep portfolio exposure need to wait out the 30-day window or move into a different, non-substantially-identical investment.
Reporting Realized Gains and Paying Estimated Tax
Every sale of a capital asset gets reported on Form 8949, which separates transactions into short-term and long-term categories.11Internal Revenue Service. Instructions for Form 8949 The totals flow onto Schedule D of your 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 sends you a Form 1099-B (or 1099-DA for digital assets) showing the proceeds and, in most cases, the cost basis for each sale.
A large gain mid-year can create an estimated tax bill people do not see coming. If you expect to owe $1,000 or more in tax after withholding and credits, and your withholding will not cover at least 90% of the current year’s tax or 100% of last year’s (110% if your prior-year AGI exceeded $150,000), you generally have to make quarterly estimated payments.13Internal Revenue Service. Form 1040-ES – Estimated Tax for Individuals Miss those and you owe an underpayment penalty that functions like interest on what you should have paid.14Internal Revenue Service. Topic No. 306 – Penalty for Underpayment of Estimated Tax If you are a W-2 employee who sold a big asset, one workaround is to file a new W-4 with your employer and raise withholding for the rest of the year rather than deal with quarterly vouchers.
State taxes add another layer. Most states tax capital gains as ordinary income with no preferential rate, and top state rates range roughly from 5% to over 13%. 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%. Running the numbers before you sell is the only way to avoid an unpleasant surprise in April.