Capital gains tax is the tax you owe when you sell something for more than you paid for it
When you sell an asset — a house, stock, cryptocurrency, or business — for more money than you originally paid, that profit is called a capital gain. The government taxes that profit. The amount you owe depends on how long you held the asset, your total income that year, and your filing status. You do not pay tax on the profit itself until you actually sell; simply owning something that went up in value does not trigger a tax bill.
The tax is calculated on the difference between what you paid (your cost 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. That $3,000 is what gets taxed, not the full $8,000.
Key Takeaways
- You only owe capital gains tax when you sell an asset for more than you paid for it; the profit itself is what gets taxed.
- Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, with rates ranging from 0% to 20% depending on your income.
- Short-term capital gains (assets held one year or less) are taxed as ordinary income at your regular tax rate, which can be much higher.
- Your cost basis includes the original purchase price plus any improvements or fees, and you must track this carefully to calculate the correct gain.
- You report capital gains on Schedule D of your tax return, and the IRS matches this against records from your broker or seller.
Long-term versus short-term capital gains rates
The tax rate you pay depends on how long you held the asset before selling it. If you owned it for more than one year, it is a long-term capital gain and receives preferential tax treatment. If you owned it for one year or less, it is a short-term capital gain and is taxed much more heavily.
Long-term capital gains rates are 0%, 15%, or 20%, depending on your income and filing status. These rates are significantly lower than ordinary income tax rates, which can reach 37%. Short-term capital gains are taxed at your ordinary income tax rate — the same rate you pay on wages or salary. This means if you are in the 24% tax bracket, a short-term gain is taxed at 24%, but a long-term gain on the same profit might be taxed at only 15%.
The holding period is measured from the date you purchased the asset to the date you sold it. If you bought stock on March 15, 2023, and sold it on March 16, 2024, it qualifies as long-term. If you sold it on March 14, 2024, it is short-term.
How cost basis affects what you owe
Your cost basis is the starting point for calculating your gain. In most cases, it is simply what you paid for the asset. If you bought a house for $300,000, your basis is $300,000. If you later sell it for $450,000, your gain is $150,000.
Cost basis can include more than the purchase price. If you bought stock and paid a $50 broker fee, your basis is the stock price plus $50. If you inherited property, your basis is typically its value on the date of death, not what the original owner paid. If you made improvements to a rental property — adding a roof or new plumbing — those costs add to your basis. Repairs and maintenance do not count; only improvements that add value or extend the life of the property.
Tracking basis matters because the IRS uses it to verify your reported gain. Your broker sends you a Form 1099-B showing the sale price; you must report the cost basis yourself. If you cannot document your basis, the IRS may assume your entire sale price is gain, which would result in a much larger tax bill.
How the IRS determines your tax bracket for capital gains
Long-term capital gains rates depend on your total taxable income, not just the gain itself. The 0% rate applies to lower incomes, 15% to middle incomes, and 20% to higher incomes. The income thresholds vary by filing status and change each year.
For 2024, the 0% long-term rate applies to single filers with taxable income up to $47,025 and married filers filing jointly up to $94,050. The 15% rate applies to income above those thresholds up to $518,900 (single) or $583,750 (married filing jointly). Anything above those amounts is taxed at 20%. These numbers shift annually for inflation.
Your taxable income includes wages, interest, dividends, and capital gains combined. If you earned $60,000 in wages and have a $20,000 long-term capital gain, your total taxable income is $80,000. That $80,000 determines which rate applies to your gain. This is why timing matters: if you can spread gains across two tax years, you might stay in a lower bracket both years rather than jumping into a higher one in a single year.
Reporting capital gains on your tax return
You report capital gains using Schedule D, a form attached to your federal tax return (Form 1040). Schedule D has two sections: one for short-term gains and one for long-term gains. You list each sale separately, showing the date acquired, date sold, cost basis, sale price, and resulting gain or loss.
Your broker sends you a Form 1099-B after the year ends, showing sales you made through their platform. The IRS receives a copy of this form, so they know what you sold and for how much. You must report the same information on Schedule D. If your reported gain does not match the 1099-B, the IRS will flag it.
If you have losses, you can use them to offset gains. If you sold one stock for a $5,000 gain and another for a $2,000 loss, you report a net gain of $3,000. If losses exceed gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year. Any remaining losses carry forward to future years.
State and local taxes on capital gains
Federal capital gains tax is only part of the picture. Most states also tax capital gains, and a few cities do as well. State rates vary widely. Some states tax capital gains at the same rate as ordinary income. Others have separate, lower rates. A few states do not tax capital gains at all.
New York, for example, taxes long-term capital gains as ordinary income, meaning rates can reach 10.9% depending on your income. California does the same, with rates up to 13.3%. Washington State has no income tax but recently enacted a capital gains tax of 7% on long-term gains over $250,000. New Hampshire taxes only interest and dividends, not capital gains.
If you live in one state and sell property in another, you may owe tax to both. The rules depend on where you live and where the property is located. This is especially relevant for real estate sales and business ownership.
Special situations: inherited assets and gifts
If you inherit an asset, your cost basis is typically its value on the date the person died, not what they originally paid. This is called a step-up in basis. If your parent bought stock for $10,000 and it was worth $50,000 when they died, your basis becomes $50,000. If you sell it immediately for $50,000, you owe no capital gains tax because there is no gain.
Gifts work differently. If someone gives you an asset, your cost basis is generally the same as theirs. If your friend bought stock for $5,000 and gave it to you when it was worth $8,000, your basis is $5,000, not $8,000. If you later sell it for $10,000, your gain is $5,000.
These rules can create significant tax differences, which is why they matter for estate planning and large gifts. A step-up in basis can eliminate a large tax bill that would otherwise be owed by the heir.
Frequently Asked Questions
Do I owe capital gains tax if I sell my primary home?
No, if you meet the requirements. You can exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly, as long as you owned and lived in the home for at least two of the last five years. If your gain exceeds those amounts, you owe tax only on the excess.
What if I sell an asset at a loss?
You can use the loss to offset capital gains from other sales. If you have no gains to offset, you can deduct up to $3,000 of losses against ordinary income in that year. Any remaining losses carry forward indefinitely to future years.
Do I have to pay capital gains tax the year I sell, or can I pay it later?
You report the gain on your tax return for the year you sold the asset and pay the tax when you file that return. You cannot defer payment to a later year, though you can request a payment plan from the IRS if you owe more than you can pay at once.
What is wash sale and does it affect capital gains?
A wash sale occurs when you sell a security at a loss and buy the same or substantially identical security within 30 days before or after the sale. The IRS disallows the loss deduction and adds it to your basis in the new purchase instead. This prevents people from claiming losses just for tax purposes while maintaining the same investment.
How do I report capital gains from cryptocurrency or digital assets?
Cryptocurrency is treated as property, not currency, so gains are capital gains. You report them on Schedule D just like stock sales. You need the purchase date, sale date, cost basis, and sale price for each transaction. If you received cryptocurrency as payment or a gift, that also creates a taxable event at fair market value on the date received.