You owe capital gains tax when you sell an investment or asset for more than you paid for it, and the tax is due in the year of the sale
Capital gains tax is not a separate tax you file on its own. It is part of your regular income tax return, filed on April 15 (or the next business day). The tax applies to the profit you make — the difference between what you paid for something and what you sold it for. If you bought stock for $1,000 and sold it for $1,500, your capital gain is $500, and that $500 is taxed as income in the year you sold it.
The timing matters. You do not owe tax when you buy. You do not owe tax while you hold the investment. You owe it only when you sell, trade, or exchange the asset for money or something of value. If you never sell, you never pay capital gains tax on that investment, even if it has grown enormously in value.
The amount you owe depends on two things: how long you held the asset, and your income level. These determine whether your gain is taxed as long-term capital gains (lower rates, held over one year) or short-term capital gains (ordinary income rates, held one year or less). Your total income for the year also matters, because capital gains rates are tiered — the same gain is taxed differently depending on your other income.
Key Takeaways
- Capital gains tax is owed in the year you sell, not when you buy or while you hold the investment.
- Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.
- Your tax rate depends on your total income for the year, because capital gains rates are tiered and phase in at different income thresholds.
- You report capital gains on Schedule D of your Form 1040, and the tax is due when you file your return on April 15.
- Losses on investments can offset gains, and unused losses can carry forward to reduce taxes in future years.
How long you held the asset determines your tax rate
If you held the investment for one year or less, any profit is a short-term capital gain. Short-term gains are taxed at your ordinary income tax rate — the same rate as wages, salary, or interest. If you are in the 22% tax bracket, your short-term capital gain is taxed at 22%. This is why timing matters for active traders: selling quickly can cost you significantly more in tax than holding longer.
If you held the investment for more than one year, any profit is a long-term capital gain. Long-term rates are lower: 0%, 15%, or 20%, depending on your income. These rates are much lower than ordinary income rates for most people. A person in the 22% ordinary income bracket might pay only 15% on a long-term capital gain from the same investment. This is the tax code's way of encouraging longer-term investing.
The one-year clock starts the day after you buy. If you buy on January 15, 2024, and sell on January 15, 2025, it is a long-term gain. If you sell on January 14, 2025, it is short-term. Your brokerage statement will usually show the holding period, but you should verify it yourself, especially if you bought and sold in different calendar years.
Your income level determines which capital gains rate you pay
Long-term capital gains are taxed at 0%, 15%, or 20%, but which rate applies depends on your total taxable income for the year. The thresholds change annually and differ based on your filing status (single, married filing jointly, head of household, and so on). For 2024, the 0% rate applies to single filers with income up to $47,025, the 15% rate applies from $47,026 to $518,900, and the 20% rate applies to income above that. These numbers are different for married couples and other filing statuses.
This means your capital gain does not automatically fall into one bracket. If you are single with $40,000 in wages and you sell an investment for a $10,000 gain, your total income is $50,000. The first $7,025 of your gain is taxed at 0%, and the remaining $2,975 is taxed at 15%. Your brokerage or tax software will calculate this for you, but understanding the brackets helps you see why a large gain in a low-income year might be taxed more favorably than the same gain in a high-income year.
Short-term capital gains do not have separate brackets — they are straightforward added to your ordinary income and taxed at whatever rate applies to your total. If you earn $80,000 in wages and have a $5,000 short-term gain, you are taxed as if you earned $85,000 in ordinary income.
How to report capital gains on your tax return
You report capital gains on Schedule D, which is part of Form 1040. Schedule D has two sections: Part I for short-term gains and losses, and Part II for long-term gains and losses. You list each sale separately — the date you bought, the date you sold, the purchase price, the sale price, and the gain or loss. Your brokerage will send you a Form 1099-B in January showing all your sales from the previous year, and you use that to fill in Schedule D.
If you have only one or two straightforward sales and no losses, some tax software will let you enter the information directly without printing Schedule D. But the form is still filed with your return; you just do not see it as a separate document. If you have many sales, losses, or complex transactions (like inherited stock or employee stock options), Schedule D becomes more detailed, and you may need to attach additional forms.
The total from Schedule D flows to your Form 1040, where it is combined with your other income. You then calculate your tax based on your total income and filing status. The capital gains are not taxed separately from the rest of your return — they are part of your overall income calculation.
Capital losses can reduce or eliminate your capital gains tax
If you sell an investment for less than you paid for it, you have a capital loss. Capital losses offset capital gains dollar-for-dollar. If you have $5,000 in long-term gains and $2,000 in long-term losses, your net long-term gain is $3,000, and you are taxed on only $3,000. This is called loss harvesting, and it is a common strategy to reduce tax liability in years when you have both winners and losers in your portfolio.
If your losses exceed your gains, you can use up to $3,000 of the excess loss to reduce your ordinary income in that year. If you have $5,000 in losses and $2,000 in gains, you have a net loss of $3,000. You can deduct $3,000 from your wages, interest, or other income, reducing your taxable income by $3,000. Any losses beyond $3,000 carry forward to future years, where you can use them to offset future gains or income.
Losses must be matched by type: long-term losses offset long-term gains first, and short-term losses offset short-term gains first. Only after one type is exhausted do they cross over. This matters because long-term gains are taxed at lower rates, so the order in which losses are applied can affect your total tax.
Special situations: inherited stock, employee options, and real estate
If you inherit stock or other investments, you receive a step-up in basis. This means your cost basis is reset to the market value on the date of death, not what the original owner paid. If someone bought stock for $10,000 and it was worth $50,000 when they died, your basis is $50,000. If you sell it when ready for $50,000, you have no gain and owe no tax. This is a significant tax benefit and applies to most inherited assets, though not to inherited retirement accounts.
Employee stock options and restricted stock units (RSUs) have their own rules. When an option vests or an RSU settles, you have ordinary income equal to the value at that time. When you later sell the stock, you have a capital gain or loss based on the difference between the vesting price and the sale price. The holding period for long-term treatment starts on the vesting date, not the grant date.
If you sell a primary residence, you may be able to exclude up to $250,000 of gain (or $500,000 if married filing jointly) if you owned and lived in the home for at least two of the last five years. This exclusion is separate from capital gains tax and is one of the largest tax breaks available. You do not report it on Schedule D; instead, you report it on Form 8949 and Schedule D, and the exclusion reduces your taxable gain automatically.
State and local taxes on capital gains
Federal capital gains tax is only part of the picture. Most states tax capital gains as ordinary income, meaning you owe state tax on top of federal tax. A few states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — do not tax capital gains at all. Others, like California, tax them at your full ordinary income rate, which can be as high as 13.3%. A handful of states, including New York and Vermont, have separate capital gains taxes that explore only to gains above a certain threshold.
Local taxes vary widely. New York City, for example, has a city income tax that applies to capital gains. If you sell an investment and live in a high-tax state or city, your total tax bill (federal plus state plus local) can be significantly higher than the federal rate alone. This is especially important if you are considering moving or if you sell a large asset near a state line.
Frequently Asked Questions
Do I owe capital gains tax if I sell at a loss?
No, you do not owe capital gains tax on a loss. Instead, you have a capital loss, which reduces your taxes. You can use losses to offset gains, and if losses exceed gains, you can deduct up to $3,000 from your ordinary income. Any unused losses carry forward to future years.
What if I sell cryptocurrency or digital assets?
Cryptocurrency is treated as property for tax purposes, not currency. When you sell it, trade it, or use it to buy something, you have a taxable event. The gain or loss is calculated the same way as stock: sale price minus cost basis. Short-term and long-term rates explore based on how long you held it.
Do I have to pay capital gains tax if I reinvest the money?
Yes. The tax is owed when you sell, regardless of what you do with the proceeds. Reinvesting the money does not defer or eliminate the tax. You owe tax on the gain in the year of the sale, even if you when ready buy another investment with the proceeds.
Can I reduce my capital gains tax by donating the stock to charity instead of selling it?
Yes, and it is often more tax-efficient than selling. If you donate appreciated stock directly to a may have access to charity, you avoid the capital gains tax entirely and can deduct the full fair market value of the stock as a charitable contribution. You get a deduction without owing tax on the gain.
When do I have to pay capital gains tax if I sell during the year?
You do not pay it during the year. You report all your sales on your tax return filed in April (or October if you file an extension), and the tax is due then. Some people make estimated tax payments throughout the year if they expect a large tax bill, but the capital gains tax itself is not due until you file your return.