Capital gains tax is the tax on profit you make when you sell an investment or property for more than you paid for it
The tax applies to the difference between what you paid (your basis) and what you sold it for (your sale price). If you bought stock for $5,000 and sold it for $8,000, your capital gain is $3,000. You pay tax only on that $3,000, not on the full $8,000. The rate you pay depends on how long you held the asset and your income level.
Capital gains tax is separate from income tax on wages or salary. The IRS treats investment profits differently than paychecks. This matters because the tax rates are often lower, and the rules about what counts as a gain are specific.
Key Takeaways
- Short-term capital gains (assets held one year or less) are taxed as ordinary income at your regular tax bracket rate, which ranges from 10% to 37% depending on your income.
- Long-term capital gains (assets held more than one year) have lower rates: 0%, 15%, or 20%, depending on your total income for the year.
- Your basis is what you originally paid for the asset, including purchase fees; your gain is the sale price minus your basis.
- You report capital gains on Schedule D of your tax return, and the IRS receives records from brokers and financial institutions about your sales.
Short-term versus long-term capital gains rates
The holding period determines which tax rate applies. If you own an asset for one year or less before selling it, the gain is short-term. Short-term gains are taxed at your ordinary income tax rate — the same rate that applies to your salary or wages. For 2024, those rates range from 10% to 37% depending on your income bracket.
If you own an asset for more than one year before selling, the gain is long-term. Long-term capital gains rates are lower: 0%, 15%, or 20%. Which rate you pay depends on your taxable income for the year, not on how much the asset appreciated. A person in a higher income bracket pays 20%; someone in a lower bracket may pay 0% or 15%.
The holding period clock starts the day after you buy the asset and ends the day you sell it. If you bought stock on March 15 and sold it on March 15 the following year, that is exactly one year, and the gain is long-term.
How the IRS calculates your gain or loss
Your basis is what you paid for the asset, including commissions, fees, and other costs directly tied to the purchase. If you bought 100 shares of stock at $50 per share and paid a $25 broker fee, your basis is $5,025 (not $5,000).
Your sale proceeds is what you received when you sold, minus any fees or commissions paid to sell. If you sold those 100 shares for $60 per share and paid a $25 broker fee, your proceeds are $5,975 (not $6,000).
Your capital gain is the proceeds minus the basis: $5,975 − $5,025 = $950. That $950 is what you report and what gets taxed. If the proceeds are less than the basis, you have a capital loss instead, which can offset other gains or, in some cases, reduce your ordinary income.
Which assets trigger capital gains tax
Capital gains tax applies to most investments and property you sell at a profit. This includes stocks, bonds, mutual funds, real estate, cryptocurrency, collectibles, and business assets. The rules are the same whether you sold through a broker, a private sale, or any other method.
Some assets have special rules. If you sell your primary residence, you may be able to exclude up to $250,000 of gain (or $500,000 if married filing jointly) if you meet the ownership and use tests. Certain small-business stock and may have access to small-business investments have preferential rates under specific conditions. Collectibles like art or coins are taxed at a maximum rate of 28%, even if they would otherwise may have access to for the 20% long-term rate.
Assets you inherit generally receive a "step-up in basis," meaning your basis becomes the fair market value on the date of death, not what the deceased person paid. This can eliminate or reduce capital gains tax if you sell the inherited asset soon after.
Reporting capital gains on your tax return
You report capital gains on Schedule D (Form 1040), which is part of your federal tax return. You list each sale separately: the date acquired, date sold, basis, proceeds, and gain or loss. The IRS receives copies of this information from your broker or financial institution on Form 1099-B, so misreporting is usually caught.
If you have only long-term gains and no losses, some tax software allows you to report directly on Form 1040 without filing Schedule D, but Schedule D is the standard form. If you have losses, you must file Schedule D to claim them.
The deadline to report capital gains is the same as your overall tax return deadline: April 15 of the following year (or October 15 if you file an extension). If you sell an asset in December 2024, you report the gain on your 2024 return, due April 15, 2025.
State and local capital gains taxes
Federal capital gains tax is only part of the picture. Most states tax capital gains as ordinary income at their state income tax rate. A few states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming). Three states — California, Hawaii, and Vermont — have separate capital gains taxes on top of ordinary income tax.
Some cities and counties also impose local income taxes that apply to capital gains. New York City, for example, taxes capital gains at the local rate in addition to state and federal rates. The total tax you owe on a gain can easily exceed 40% when you combine federal, state, and local rates.
You report state and local capital gains taxes on your state and local returns, using the same Schedule D information from your federal return. The rules for basis, holding period, and gain calculation are usually the same at the state level, though some states have different rates or exemptions.
Strategies for managing capital gains tax
Holding assets for more than one year before selling is the most direct way to reduce your rate. The difference between short-term (ordinary income) and long-term (0%, 15%, or 20%) rates can be substantial — potentially 17 percentage points or more.
Harvesting losses is another common approach. If you have a loss on one investment, you can sell it and use that loss to offset gains from other investments. If losses exceed gains, you can deduct up to $3,000 of net losses against ordinary income in a single year, and carry forward any remaining losses to future years. This requires careful record-keeping and awareness of the "wash sale" rule, which prevents you from buying the same or a substantially identical security within 30 days before or after the sale.
Timing your sales across tax years can also matter. If you are near a higher tax bracket, selling in a year when your income is lower may result in a lower capital gains rate. Donating appreciated securities to charity instead of selling them lets you avoid the capital gains tax entirely while getting a charitable deduction for the full fair market value.
Frequently Asked Questions
Do I owe capital gains tax if I sold at a loss?
No. If you sold an asset for less than you paid, you have a capital loss, not a gain. You can use losses to offset other capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 against ordinary income in that year and carry forward the rest to future years.
What if I inherited an investment or property?
Inherited assets receive a step-up in basis to the fair market value on the date of death. If you inherited stock worth $50,000 and it was worth $30,000 when the person died, your basis is $50,000. If you sell it immediately for $50,000, you owe no capital gains tax. This applies to most inherited assets, though some exceptions exist for certain retirement accounts.
How do I know my basis if I bought stock years ago?
Your broker or financial institution should have records going back several years. If you no longer have access to those records, you can contact the company that issued the stock or the transfer agent. For very old purchases, the IRS may accept reasonable reconstructions of basis based on historical stock prices, though you should document your method.
Is cryptocurrency taxed the same way as stocks?
Yes. The IRS treats cryptocurrency as property. When you sell it, trade it, or use it to buy something, you have a taxable event. Your basis is what you paid (in dollars or other property), and your gain is the fair market value when you sold or used it minus your basis. The holding period rules are the same: more than one year for long-term rates.
Can I deduct investment losses against my salary or wages?
Only up to $3,000 per year. If you have $10,000 in capital losses and no capital gains, you can deduct $3,000 against ordinary income (wages, salary, interest, etc.). The remaining $7,000 carries forward to the next year, when you can deduct another $3,000, and so on until the losses are used up or offset by future gains.