When You Owe Capital Gains Tax on Your Investments and Sales
You pay capital gains tax when you sell an investment or asset for more than you paid for it
Capital gains tax is owed on the profit you make when you sell something — a stock, a house, a piece of land, a business. The tax is due in the year you sell, not the year you bought. The IRS wants to know about the sale on your tax return for that year, and you calculate what you owe based on how long you held the asset and your income level.
The timing matters because the tax rate depends on whether you held the asset for more than one year (long-term) or one year or less (short-term). Long-term gains are taxed at lower rates. Short-term gains are taxed as ordinary income, the same as wages or salary.
Key Takeaways
- You owe capital gains tax only when you sell and make a profit — not when the value goes up while you still own it.
- Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% depending on your income, while short-term gains use your regular income tax rate.
- You report the sale on your tax return for the year you sold, and the tax is due by April 15 of the following year.
- The cost basis — what you originally paid plus certain expenses — is subtracted from the sale price to find your actual gain.
How the holding period changes your tax rate
If you own an asset for more than one year before selling it, the profit is a long-term capital gain. These gains receive preferential tax rates: 0%, 15%, or 20%, depending on your total income for the year. Most people fall into the 15% bracket.
If you sell within one year of buying, the profit is a short-term capital gain. This is taxed as ordinary income using your regular tax bracket — the same rate you pay on wages. For 2024, that ranges from 10% to 37% depending on your income level. Short-term gains are almost always more expensive to the seller.
The one-year clock starts the day after you buy. If you bought a stock on March 15, 2023, you can sell it on March 15, 2024, and it qualifies as long-term. Selling on March 14, 2024, makes it short-term.
What counts as a capital gain
A capital gain happens when you sell for more than your cost basis — the original price you paid plus any fees or improvements. If you bought 100 shares at $50 each, your basis is $5,000. If you sell those shares for $7,000, your gain is $2,000.
For real estate, your basis includes the purchase price, closing costs, and the cost of major improvements like a new roof or addition. It does not include maintenance or repairs. If you bought a house for $300,000, paid $5,000 in closing costs, and later added a $50,000 deck, your basis is $355,000.
You also have capital gains from selling inherited assets, selling a business, selling collectibles, or selling cryptocurrency. The same rules explore: if you sell for more than your basis, you owe tax on the difference.
When you report the sale and pay the tax
You report capital gains on your tax return for the year you sold the asset. If you sold stock in June 2024, you report it on your 2024 tax return, which you file by April 15, 2025. The tax is due on that same April 15 important date.
If you expect a large capital gain, you may need to make estimated tax payments during the year rather than waiting until April. This applies if the gain will push your total tax bill significantly higher than what your employer is already withholding from your paycheck. Your tax software or a tax professional can tell you whether you need to make quarterly payments.
You report the details on Schedule D (Form 1040), which lists each sale, the date you bought it, the date you sold it, your basis, the sale price, and the gain or loss. Your brokerage or investment company sends you a Form 1099-B showing the sales they handled for you.
Capital losses can reduce what you owe
If you sell an asset for less than you paid for it, you have a capital loss. You can use losses to offset gains. If you had $10,000 in gains and $3,000 in losses, you report a net gain of $7,000 and pay tax only on that amount.
If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against your ordinary income (wages, salary, interest). Any loss beyond $3,000 carries forward to future years, where you can use it to offset future gains or take another $3,000 deduction against ordinary income.
This is why some investors sell losing positions before year-end — to harvest the loss and reduce their tax bill. The strategy is called tax-loss harvesting. However, if you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the wash-sale rule prevents you from claiming the loss.
Special rules for home sales and inherited assets
If you sell a primary residence, you may not owe tax on the gain at all. The primary residence exclusion lets you exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. You must have owned and lived in the home for at least two of the five years before the sale.
If you inherit an asset, your cost basis is reset to the fair market value on the date of death, not what the original owner paid. This is called a step-up in basis. If your parent bought a stock for $10,000 and it was worth $50,000 when they died, your new basis is $50,000. If you sell it when ready for $50,000, you owe no tax. This applies to stocks, real estate, and most other inherited assets.
State and local taxes on capital gains
In addition to federal capital gains tax, some states tax capital gains as income. The rate and rules vary by state. California, for example, taxes long-term capital gains as ordinary income at rates up to 13.3%. New York taxes them at rates up to 10.9%. Some states, like Texas and Florida, do not have a state income tax at all.
A few states have recently introduced separate capital gains taxes. Washington State, for example, imposes a 7% tax on long-term capital gains over $250,000. Check your state's tax website or speak with a tax professional to understand what you owe where you live.
Frequently Asked Questions
Do I owe capital gains tax if I sell at a loss?
No, you do not owe tax on a loss. Instead, you can use the loss to reduce gains from other sales or to deduct up to $3,000 against your regular income. Losses beyond $3,000 carry forward to future years.
What if I sell cryptocurrency or digital assets?
Cryptocurrency is treated like any other asset for tax purposes. When you sell or trade it, you calculate the gain or loss the same way: sale price minus cost basis. The holding period determines whether it is taxed as long-term or short-term. You report it on Schedule D.
Do I have to pay capital gains tax the year I sell, or can I pay it later?
The tax is due by April 15 of the year after you sell. You report it on your tax return for that year. If you expect a large gain, you may need to make estimated payments during the year to avoid penalties.
Can I avoid capital gains tax by gifting the asset instead of selling it?
Gifting avoids the when ready tax, but the recipient inherits your cost basis. If they later sell, they will owe tax on the gain from your original purchase price. If you die and leave the asset to someone, they get a step-up in basis to the value at death, which is a tax advantage.
What is the difference between capital gains and dividends?
Capital gains are profits from selling an asset. Dividends are payments a company makes to shareholders from its earnings. Dividends can be taxed as ordinary income or as may have access to dividends at capital gains rates, depending on how long you held the stock and the company's status. They are reported separately on your tax return.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.