What Is a Capital Gain? Rules, Taxes, and Asset Types
By Markets & Investing DeskUpdated Nov 10, 2026

Definition
A capital gain is the profit from selling a capital asset for more than its adjusted basis. In the U.S., it is taxed when realized, at a rate set by holding period, asset type and income.
Key takeaways
- Assets held more than one year get long-term rates of 0%, 15% or 20%; shorter holds face ordinary rates.
- Net capital losses can offset up to $3,000 of ordinary income a year, with the rest carried forward.
- Homeowners meeting the two-of-five-years test can exclude up to $250,000 of gain, or $500,000 jointly.
- Collectibles face a 28% maximum rate, and the 3.8% NIIT can lift a high earner's top rate to 23.8%.
A capital gain is the profit from selling or otherwise disposing of a capital asset for more than its cost basis. If you buy shares for $5,000 and sell them for $7,000, the $2,000 difference is a capital gain. If you sell for less than your basis, the shortfall is a capital loss. In the United States, the gain is taxable in the year you realize it. The rate depends on how long you held the asset, what kind of asset it is, and your taxable income.
What counts as a capital asset
For tax purposes, almost everything you own for personal use or investment is a capital asset. That includes stocks, bonds, mutual fund and ETF shares, cryptocurrency (which the IRS treats as property), a home, a car, jewelry, furniture and art.
The tax code carves out several categories that are not capital assets:
- Inventory and property held mainly for sale to customers in a business
- Depreciable property and real estate used in a trade or business, including rental property. Sales of these follow separate rules that can still produce capital gain treatment for part of the profit.
- Copyrights, literary, musical or artistic compositions held by the person who created them
- Accounts or notes receivable acquired in the ordinary course of business
A gain on an asset outside these exclusions is a capital gain. Losses are treated differently. A loss on property held for personal use, such as selling your car or your home for less than you paid, is not deductible, even though a gain on the same property would be taxable.
How a capital gain is calculated
The basic formula is: Capital gain (or loss) = Amount realized − Adjusted basis
- Amount realized is the sale price minus selling costs such as commissions, transfer fees or real estate agent fees.
- Basis usually starts as the purchase price plus acquisition costs. It is then adjusted. Capital improvements to a home increase basis. Depreciation deducted on business or rental property reduces it.
Basis does not always equal what you paid. Inherited property generally takes a basis equal to its fair market value at the date of death, often called a “step-up” in basis. Gifted property generally keeps the donor’s basis. Reinvested dividends add to the basis of fund shares, so overlooking them leads to overstating the gain.
Realized vs. unrealized gains
A gain becomes a taxable event only when it is realized, typically through a sale or exchange. If a stock you own doubles but you keep holding it, the gain is unrealized. No tax is due, and the gain can shrink or disappear before you sell.
Short-term vs. long-term
The holding period decides which tax treatment applies:
- Short-term: the asset was held one year or less
- Long-term: the asset was held more than one year
The holding period generally starts the day after you acquire the asset and includes the day you sell it. Selling one day too early can move a gain from long-term rates to ordinary income rates. Inherited property is treated as long-term regardless of how long the heir held it.
How capital gains are taxed in the U.S.
Short-term gains are added to your other income and taxed at your ordinary income tax rate, which depends on filing status and taxable income. Long-term gains get preferential rates, with current thresholds covered under capital gains tax rates and brackets.
Long-term rates: 0%, 15% and 20%
Most long-term gains fall into one of three rates, set by your taxable income and filing status:
| Rate | Applies when |
|---|---|
| 0% | Taxable income is at or below the threshold for the 0% bracket |
| 15% | Taxable income is above the 0% threshold and at or below the 15% maximum |
| 20% | Taxable income exceeds the 15% maximum |
The income thresholds are adjusted each year for inflation. Gains stack on top of ordinary income, so a single large sale can spill across two brackets. Part of the gain is then taxed at 15% and part at 20%.
Special rates and additional taxes
Some gains do not follow the standard schedule:
- Collectibles such as art, antiques, coins, stamps and precious metals: long-term gains are taxed at a maximum of 28%.
- Qualified small business stock: the taxable portion of the gain can also face the 28% rate.
- Unrecaptured Section 1250 gain: the portion of a real estate gain attributable to prior depreciation is taxed at up to 25%.
- Net investment income tax (NIIT): a 3.8% surtax applies to investment income, including capital gains, for taxpayers whose modified adjusted gross income exceeds statutory thresholds. A high earner’s top federal rate on long-term gains can therefore reach 23.8%.
State income taxes may apply on top of federal tax. Many states tax capital gains as ordinary income.
Netting gains and losses: what a net capital gain is
You do not pay tax on each sale separately. Gains and losses are netted in a set order:
- Short-term gains are netted against short-term losses.
- Long-term gains are netted against long-term losses, including any capital loss carried over from earlier years.
- If one side is a gain and the other a loss, the two results are netted against each other.
The IRS defines a net capital gain as the amount by which net long-term capital gain exceeds net short-term capital loss. That figure is the portion eligible for the lower long-term rates.
If the overall result is a net loss, you can deduct up to $3,000 of it against ordinary income per year ($1,500 if married filing separately). Any remaining loss carries forward to future years with no expiration. Under the wash sale rule, a loss on a security is disallowed if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the basis of the new shares rather than lost entirely.
Sales are reported on Form 8949 and summarized on Schedule D of Form 1040. Brokers report securities sales to taxpayers and the IRS on Form 1099-B.
Example of a capital gain
Hypothetical example, for illustration only.
An investor buys 100 shares at $50 each and pays a $10 commission. Later the investor sells all 100 shares at $80 each and pays another $10 commission.
- Basis: (100 × $50) + $10 = $5,010
- Amount realized: (100 × $80) − $10 = $7,990
- Capital gain: $7,990 − $5,010 = $2,980
The tax depends on the holding period. Assume the investor is single and the gain falls entirely within one bracket:
- Held 14 months (long-term), with an assumed 15% rate: $2,980 × 0.15 = $447
- Held 10 months (short-term), with an assumed 24% ordinary income rate: $2,980 × 0.24 = $715.20
Now add a $1,000 short-term loss on another stock sold the same year while the $2,980 gain is long-term. The netting produces a net long-term gain of $2,980 and a net short-term loss of $1,000. The net capital gain is $1,980, and that amount is taxed at the long-term rate.
Capital gains on a home
Selling a main home can produce a large gain, but much of it can be excluded. If you owned the home and used it as your main residence for at least two of the five years before the sale, you can exclude up to $250,000 of gain. Married couples filing jointly can generally exclude up to $500,000 if both meet the use test and at least one meets the ownership test. The exclusion generally can be used once every two years.
Two things reduce the taxable gain on a home that exceeds the exclusion:
- Records of capital improvements. Additions, a new roof or a remodeled kitchen raise the basis and lower the gain. Routine repairs do not count.
- Selling costs. Agent commissions and certain closing costs reduce the amount realized.
Capital gains from mutual funds and ETFs
A fund can create taxable gains for you even when you sell nothing. When a mutual fund realizes net gains by selling securities in its portfolio, it must distribute them to shareholders, often near the end of the calendar year. Form 1099-DIV shows the amount and whether each distribution is short- or long-term. Capital gain distributions are generally treated as long-term no matter how long you have owned the fund shares. If a fund retains long-term gains instead, it reports your share on Form 2439.
On the distribution date, the fund’s net asset value falls by the amount paid out, so the distribution does not raise your total return. It does create a tax bill in a taxable account. A fund’s capital gains exposure, meaning its unrealized accumulated gains as a percentage of net assets, indicates how much future distributable gain is built into the portfolio. Buying into a fund with large exposure means you may be taxed on gains that accrued before you owned it.
Selling your own fund shares is a separate event, with gain or loss measured against your basis in those shares.
Limitations and common confusions
A capital gain is not the same as investment return. Dividends and interest are income, not capital gains, even though qualified dividends share the long-term rate schedule. Total return combines price change and income.
Dollar gain is not inflation-adjusted. Basis is not indexed to inflation in the U.S., so an asset held for decades can show a taxable gain that partly reflects a general rise in prices rather than real growth.
Rules differ by country. The holding periods, rates and exclusions described here are U.S. federal rules. Other countries set their own thresholds. India, for example, uses different holding periods for listed shares and for property, and Canada taxes only a portion of a capital gain as income.
FAQs
Do I owe tax on a gain if I reinvest the proceeds?
Generally yes. Selling one stock and buying another the same day still realizes the gain on the first sale. Exceptions are narrow and specific. One example is a like-kind exchange of real property held for business or investment.
The Bottom Line
Anyone selling stocks, funds, crypto, collectibles or a home in the U.S. needs to know their basis and holding period before selling. Holding past one year, tracking reinvested dividends and home improvements, and netting losses against gains can all lower the tax owed. Fund investors in taxable accounts should also watch for year-end capital gain distributions, which create a tax bill even when they sell nothing.















