What happens to your profit when you sell an investment
When you sell an investment for more than you paid for it, the profit is called a capital gain, and the IRS taxes it. The tax rate depends on how long you held the investment before selling — if you held it for more than one year, you pay the long-term capital gains rate, which is lower. If you sold it within one year, you pay the short-term capital gains rate, which is the same as your ordinary income tax rate.
The long-term rates are 0%, 15%, or 20%, depending on your total income for the year. Short-term gains are taxed at your regular tax bracket, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%. This difference — sometimes 15 percentage points or more — is why the holding period matters so much.
You report capital gains on Schedule D (Form 1040), which you attach to your tax return. The IRS uses this form to separate long-term gains from short-term gains and calculate the tax you owe.
Key Takeaways
- Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% based on your income; short-term gains are taxed at your regular income tax rate, which is usually higher.
- The holding period starts the day after you buy and ends the day you sell — you must hold for more than 365 days to may have access to for the lower long-term rate.
- You report gains on Schedule D and must include the purchase price, sale price, and sale date for each investment you sold during the year.
- Losses on investments can reduce your capital gains dollar-for-dollar, and unused losses can reduce other income by up to $3,000 per year.
- The tax is due when you file your return, not when you sell — but if you owe more than $1,000, you may need to make quarterly estimated payments.
How the holding period determines your tax rate
The IRS counts the holding period from the day after you buy to the day you sell. If you buy stock on January 15 and sell it on January 15 the next year, you have held it for exactly one year — but you need to hold it for more than one year to get the long-term rate. You would need to sell on January 16 or later.
This matters because the difference between short-term and long-term rates can be substantial. If you are in the 24% tax bracket and sell a stock you held for 11 months, you pay 24% on the gain. If you wait one more month and sell, you might pay 15% instead — a 9 percentage point savings on every dollar of profit.
Some investors use this timing deliberately. If you have a large gain and are close to the one-year mark, waiting a few weeks can reduce your tax bill significantly. Conversely, if you have a loss, you might sell before one year to use it against short-term gains or ordinary income.
Long-term capital gains rates and income thresholds
The long-term rate you pay depends on your taxable income for the year, not the size of the gain itself. The IRS sets three brackets: 0%, 15%, and 20%. The income thresholds change each year and differ based on whether you file as single, married filing jointly, head of household, or married filing separately.
For 2024, the 0% rate applies to single filers with taxable income up to $47,025 and married couples filing jointly up to $94,050. The 15% rate applies to income above those amounts up to $518,900 (single) or $583,750 (married filing jointly). Anything above those thresholds is taxed at 20%. These numbers increase slightly each year for inflation.
This means you can have a large capital gain and still pay 0% if your other income is low enough. A retiree with $30,000 in Social Security and a $15,000 stock gain might pay no capital gains tax at all, because their total taxable income stays within the 0% bracket.
Short-term gains and your regular tax bracket
Short-term capital gains are added to your wages, interest, and other ordinary income and taxed at your regular tax bracket. If you earn $60,000 in salary and have a $10,000 short-term gain, the IRS treats it as $70,000 of income for tax purposes.
This can push you into a higher bracket. If you are single and earn $50,000, you are in the 22% bracket. A $20,000 short-term gain moves you to $70,000 of income, which puts you in the 24% bracket. You pay 24% on the gain, not 22%.
Short-term gains are common when you sell mutual funds, bonds, or stocks you have owned for less than a year. They are also the result of trading activity — if you buy and sell the same stock multiple times in one year, each sale is a short-term gain or loss.
How to report gains and losses on Schedule D
You list each investment you sold on Schedule D (Form 1040). For each sale, you enter the date you bought it, the date you sold it, the purchase price (called your cost basis), the sale price, and the gain or loss. The form separates long-term transactions from short-term ones and calculates your totals automatically.
Your brokerage or investment company sends you a Form 1099-B or Form 1099-S listing the sales they processed for you. You use this form to fill in Schedule D. If you sold real estate, you may receive a Form 1099-S instead, though not all states require it.
If you sold only one or two investments and had a small gain, you might be able to report it directly on Form 1040 without filing Schedule D — but most people with capital gains do file Schedule D because it is clearer and the IRS expects it. If you have losses, Schedule D is required so you can claim them.
Using capital losses to reduce your tax bill
If you sold an investment for less than you paid for it, you have a capital loss. You can use losses to reduce your capital gains dollar-for-dollar. If you had $8,000 in long-term gains and $3,000 in long-term losses, your net gain is $5,000, and you pay tax only on that amount.
If your losses exceed your gains, you can use up to $3,000 of the excess loss to reduce other income — wages, interest, rental income, and so on. If you have more than $3,000 in unused losses, you can carry them forward to future years and use them the same way.
This is why some investors "harvest" losses at the end of the year. If a stock has fallen in value, they sell it to lock in the loss, then buy a similar (but not identical) stock to maintain their investment position. The loss reduces their tax bill, and they stay invested in the same sector or company type.
When you owe estimated taxes on capital gains
Capital gains tax is due when you file your return, usually in April. However, if you expect to owe more than $1,000 in federal income tax for the year, the IRS may require you to make quarterly estimated tax payments throughout the year.
This applies if you sold a large investment and will owe significant tax on the gain. You calculate your expected tax liability and divide it into four payments due on April 15, June 15, September 15, and January 15. If you do not make these payments and owe more than $1,000 at tax time, you may owe a penalty.
You do not have to make estimated payments if your employer withholds enough tax from your paycheck to cover both your regular income tax and the capital gains tax. Many people with W-2 jobs do not need to worry about this because their withholding handles it automatically.
Special situations: real estate, inherited investments, and wash sales
Real estate sales are reported on Schedule D but often involve additional forms and calculations. If you sold a home you lived in, you may be able to exclude up to $250,000 (or $500,000 if married filing jointly) of the gain from tax if you meet the ownership and use tests. If you sold rental property or investment real estate, the entire gain is taxable, and you may also owe depreciation recapture tax at 25% on the portion of the gain that came from depreciation deductions you claimed.
If you inherited an investment, your cost basis is "stepped up" to the market value on the date of death. This means if your parent bought a stock for $10 and it was worth $50 when they died, your basis is $50. If you sell it for $55, you owe tax only on the $5 gain, not the $40 gain your parent would have owed.
A wash sale occurs when you sell an investment at a loss and buy the same or a substantially identical investment within 30 days before or after the sale. The IRS disallows the loss and adds it to your cost basis in the new investment instead. This rule prevents you from claiming a loss for tax purposes while maintaining your investment position.
Frequently Asked Questions
Do I have to pay capital gains tax if I reinvest the money?
Yes. The tax is based on the profit, not on what you do with the money afterward. If you sell a stock for a $5,000 gain and when ready buy a different stock with the proceeds, you still owe tax on the $5,000 gain. Reinvesting does not defer or eliminate the tax.
What if I sold an investment at a loss — do I have to report it?
You should report it on Schedule D so you can use the loss to reduce other gains or income. If you do not report it, you lose the tax benefit. The IRS does not require you to report losses, but reporting them is how you claim the deduction.
Can I avoid capital gains tax by holding an investment forever?
You avoid the tax as long as you hold the investment, but you do not avoid it forever. When you eventually sell or when you pass the investment to your heirs, the tax becomes due (or your heirs receive a stepped-up basis). The only way to avoid it entirely is to never sell and leave the investment to heirs, who then inherit it at current market value.
How do I know my cost basis if I lost the original purchase documents?
Your brokerage can usually provide cost basis information going back several years. If you bought through a broker that no longer exists, contact the successor firm or ask the IRS for help. For very old investments, you may need to reconstruct the basis using historical stock prices, though the IRS is generally reasonable about this if you make a good-faith effort.
Is there a difference between capital gains tax and investment income tax?
Yes. Capital gains tax applies to profits from selling an investment. Investment income tax applies to dividends and interest you earn while holding the investment. may have access to dividends are taxed at the same long-term capital gains rates (0%, 15%, or 20%), but non-may have access to dividends and interest are taxed as ordinary income at your regular tax bracket.