You pay federal capital gains tax on your profit, not on the full amount you receive from a sale. If you bought stock for $8,000 and sold it for $10,000, the tax applies to the $2,000 gain, not the $10,000 in proceeds.1Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss The same principle runs through nearly everything the tax code treats as a capital asset: your home, your stocks and bonds, your household property, your investment real estate.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses What varies is how the profit is measured and which rate attaches to it.
How the Profit Is Measured
Your taxable gain equals the amount realized on the sale minus your adjusted basis in the property. The amount realized is everything you receive: cash, the fair market value of any property taken in trade, and any debt the buyer assumes. The adjusted basis is broadly what the asset cost you, changed over time by specific events the tax code recognizes.3Office of the Law Revision Counsel. 26 USC 1011 – Adjusted Basis for Determining Gain or Loss Sell for less than that adjusted basis and you have a capital loss instead.
Nothing is taxable until you actually sell, exchange, or otherwise dispose of the asset. Watching a stock climb on paper does not create a tax bill; the taxable event is the moment you convert the asset into cash or trade it for something else.1Office of the Law Revision Counsel. 26 USC 1001 – Determination of Amount of and Recognition of Gain or Loss
What Goes Into Your Cost Basis
Basis starts with what you paid, including the purchase price and any debt you took on to acquire the asset.4Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property Cost From there, the tax code lets you push the number up or down based on what happens while you own it.
For real estate, the upward adjustments are where careful record-keeping earns its keep. Capital improvements that increase the property’s value, extend its useful life, or adapt it to a new purpose all get added to basis. A kitchen remodel, a new roof, a finished basement, a heating system upgrade.5Internal Revenue Service. Publication 523 – Selling Your Home – Section: Improvements Settlement costs from the original purchase, such as title insurance and legal fees, count too.6Internal Revenue Service. Property (Basis, Sale of Home, Etc.) 3 Routine maintenance does not qualify. Patching a leak is a repair; replacing the whole roof is an improvement.
The math matters. A $50,000 renovation added to a $300,000 purchase price creates a $350,000 adjusted basis, cutting the taxable gain by $50,000 at sale. Lost receipts for legitimate improvements are one of the most expensive mistakes homeowners make.
Basis also moves in the other direction. Depreciation deductions claimed on a rental property reduce basis dollar for dollar, which enlarges the eventual gain when you sell.
Inherited and Gifted Property Follow Different Rules
How you got the asset can change the calculation dramatically. Property inherited after the owner’s death receives a stepped-up basis equal to its fair market value on the date of death.7Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a parent bought stock for $10,000 in 1990 and it was worth $200,000 at their death, your basis is $200,000. Sell soon after at roughly that value and there is little or no gain to tax. Inherited property is also automatically treated as long-term, regardless of how long the person who died had held it.
Gifts work the opposite way. When someone gives you property while they are alive, you take their original basis with you. This is called carryover basis.8Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust That same $10,000 stock gifted to you at $200,000 leaves you with a $10,000 basis and $190,000 of taxable appreciation whenever you sell.
Short-Term vs. Long-Term Rates
How long you held the asset before selling determines the rate on your profit. Sell within one year or less and the gain is short-term, taxed at the same rate as your wages.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Hold for more than a year and the gain qualifies for the lower long-term capital gains rates.
For 2026, long-term rates for single filers are:9Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed – Section: Maximum Capital Gains Rate
- 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 upper limits.
Most filers land at 15%. The 0% rate is real and catches many retirees and lower-income sellers who assume they owe something. The gap between short-term and long-term treatment can be large. Someone in the 32% ordinary bracket who sells at 11 months instead of 13 can end up paying more than double the tax on the same profit.
Higher Rates for Collectibles and Recaptured Depreciation
Two categories of long-term gain do not get the standard 0/15/20% treatment.
Collectibles, including art, antiques, gold, silver, gems, stamps, coins, and fine wine, are taxed at a maximum rate of 28% when held for more than a year.9Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed – Section: Maximum Capital Gains Rate If your regular long-term rate would be lower, you pay the lower rate; anyone in the 22% ordinary bracket or higher ends up paying more on collectibles than on stock.
Depreciation recapture on real estate is capped at 25%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses The portion of your gain attributable to depreciation deductions you claimed is taxed at up to 25%, and only the remaining gain gets the regular long-term rate. Landlords who have been deducting depreciation for years often see this bite for the first time at closing.
The 3.8% Surtax at Higher Incomes
Higher earners face an additional 3.8% net investment income tax on capital gains, dividends, interest, and rental income.10Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax It applies to the smaller of your net investment income or the amount by which your modified adjusted gross income exceeds:
- $200,000 for single filers
- $250,000 for married couples filing jointly
- $125,000 for married filing separately
These thresholds are not indexed for inflation, so more filers cross them each year. Someone with $220,000 in modified AGI and $30,000 of long-term gain pays the 3.8% on the $20,000 above the threshold. At the top, a high-income seller can face a combined 23.8% federal rate on long-term gains before any state tax.
Losses Reduce the Profit You Pay On
Capital losses cut directly into capital gains. The code lets you subtract losses from gains before figuring what you owe.11Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses Realize $15,000 in gains and $10,000 in losses in the same year and only $5,000 is taxed.
When losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if married filing separately.12Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything left over carries forward indefinitely until it is fully used.13Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers
One trap. If you sell a security at a loss and buy the same or a substantially identical one within 30 days before or after the sale, the wash sale rule disallows the loss for that year.14Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed amount is added to the basis of the replacement shares, so you get the benefit later, but not on this year’s return. To harvest a loss cleanly, wait at least 31 days before buying back in, or move into an investment that is not substantially identical.
The Home Sale Exclusion
For most people, the largest capital gains break they will ever use is the home sale exclusion. Selling your primary residence lets you exclude up to $250,000 of gain from tax, or $500,000 for married couples filing jointly.15Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Only gain above that threshold is taxable.
To qualify, you must have owned and lived in the home as your primary residence for at least two of the five years before the sale. The two years do not need to be consecutive. For married couples claiming the full $500,000, both spouses must meet the use test, though only one needs to meet the ownership test.15Office 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. The exclusion does not shield gain attributable to depreciation claimed after May 6, 1997, if you rented out part of the home or ran a home office; that portion is taxed as recapture at up to 25%.
Deferring Real Estate Gains With a 1031 Exchange
Investors who sell real estate held for business or investment can defer the gain entirely by reinvesting the proceeds into similar property through a like-kind exchange.16Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment Since 2018, the provision applies only to real property, not equipment, vehicles, or other personal property.
The clock is strict. From the closing on your sold property, you have 45 days to identify replacement property and 180 days to close on it.17Internal Revenue Service. Like-Kind Exchanges Under IRC Section 1031 Miss either deadline and the whole gain becomes taxable. The proceeds must sit with a qualified intermediary during the exchange; if the money touches your hands, the exchange fails. The tax is deferred, not erased: your original basis carries into the replacement property, and the gain is captured whenever you eventually cash out without another exchange.
Reporting the Sale
Each sale or exchange goes on Form 8949, showing the acquisition date, sale date, proceeds, and adjusted basis for every transaction.18Internal Revenue Service. Instructions for Form 8949 – Sales and Other Dispositions of Capital Assets Your brokerage sends a Form 1099-B with most of it pre-filled, but check the cost basis, especially on shares acquired through reinvested dividends, stock splits, or employer stock plans, where brokers sometimes get it wrong.
Totals from Form 8949 flow to Schedule D, which separates short-term and long-term activity and applies the right rates. The net result lands on your Form 1040. A home sale generally does not need to be reported at all if the gain falls within the exclusion and you did not receive a Form 1099-S from the closing agent.19Internal Revenue Service. Publication 523 – Selling Your Home