Why this topic matters to your bank account
You bought a stock for $1,000. Two years later, you sold it for $1,800. That extra $800 isn't all yours to keep 鈥?or is it?
The answer depends on something called capital gains tax. It's the tax you pay on profit from selling investments like stocks, real estate, or collectibles. And how much you pay can vary wildly based on one simple thing: how long you held the asset.
For people who buy and sell investments, capital gains tax is often the second-biggest expense after income tax. But here's the good news: you have real control over it. The system is designed to reward certain behaviors, and once you understand the rules, you can plan around them and keep more of your money.
What is capital gains tax?
Capital gains tax is a tax on the profit you make when you sell an asset for more than you paid for it. If you sell for less than you paid, that's a capital loss.
Only the gain is taxed 鈥?not the total sale price. So if you buy shares for $5,000 and sell them for $6,000, you pay tax on the $1,000 gain, not the full $6,000.
The government treats different types of assets differently:
- Stocks, bonds, mutual funds, ETFs 鈥?the most common taxable investments
- Real estate 鈥?your primary home gets special treatment (up to $250,000 or $500,000 gain may be tax-free for married couples)
- Collectibles 鈥?art, antiques, coins, and precious metals are taxed at a separate rate (28%)
- Cryptocurrency 鈥?treated as property, so capital gains rules apply to every trade
The two big categories are short-term and long-term, and the dividing line is exactly one year.
How capital gains tax works
Short-term capital gains (held 1 year or less)
Short-term gains are taxed as ordinary income. That means your capital gains are added to your regular income, and you pay whatever your marginal tax rate is. In 2024, those rates run from 10% to 37% depending on your total income.
Example: If you're a single filer earning $60,000 in salary and you sell a stock after 6 months for a $5,000 gain, that $5,000 is stacked on top of your $60,000. You'd pay 22% tax on it 鈥?about $1,100.
Long-term capital gains (held more than 1 year)
Long-term gains get special, lower tax rates. For most people, those rates are 0%, 15%, or 20%. There's also a 3.8% net investment income tax (NIIT) for high earners, which kicks in above $200,000 for single filers or $250,000 for married couples.
Here are the 2024 long-term capital gains rate thresholds:
| Tax Rate | Single Filers | Married Filing Jointly | Head of Household |
|---|---|---|---|
| 0% | $0 鈥?$47,025 | $0 鈥?$94,050 | $0 鈥?$63,000 |
| 15% | $47,026 鈥?$518,900 | $94,051 鈥?$583,750 | $63,001 鈥?$551,350 |
| 20% | Over $518,900 | Over $583,750 | Over $551,350 |
These thresholds are based on your total taxable income, including the capital gains themselves. So if you have $40,000 in regular income and a $10,000 long-term gain, your total is $50,000 鈥?and that $10,000 gain would be taxed at 15%, not 0%.
Real examples with real numbers
Let's walk through three scenarios using the same investment so you can see how time and income affect the tax bill.
Scenario A: You sell after 6 months
You buy $10,000 of Apple stock. Six months later, you sell for $13,000. Gain: $3,000.
Your salary is $55,000 as a single filer. Total income: $58,000.
Your marginal tax bracket: 22%.
Tax on gain: $660.
Scenario B: You sell after 14 months
Same $10,000 purchase, now worth $13,000. Same salary of $55,000.
Total income: $58,000. This falls in the 0% long-term bracket (up to $47,025) for the portion of your income up to $47,025, but the gain pushes you into the 15% bracket.
However, you'd only pay 15% on the portion of the gain that exceeds the 0% threshold. Let's say after adding your salary and the gain, your taxable income is $58,000. The 15% bracket for long-term gains starts at $47,026. So $58,000 - $47,025 = $10,975 of the gain is taxed at 15%. That's about $1,646 on the gain.
(Wait 鈥?in this example, you're actually better off with short-term? That's because the 0% bracket is so generous. But let's see a more typical case.)
Scenario C: More realistic comparison
You have a salary of $80,000. You buy $10,000 of stock and sell for $13,000.
Short-term (6 months): Total income $83,000. Marginal tax rate 24%. Tax = $3,000 脳 24% = $720.
Long-term (14 months): Total income $83,000. The 0% bracket ends at $47,025. The remaining $35,975 of your salary falls in the 15% bracket. Your $3,000 gain is also in the 15% bracket. Tax = $3,000 脳 15% = $450.
Saving: $270 鈥?that's a 37.5% reduction in taxes just by waiting two more months.
Pros and cons of the capital gains system
| Pros | Cons |
|---|---|
| Lower rates for long-term 鈥?rewards patient investing | Short-term rates match ordinary income 鈥?frequent trading gets heavily taxed |
| 0% bracket 鈥?if your total income is under about $47k (single), you may owe nothing on long-term gains | No inflation adjustment 鈥?you can be taxed on gains that are just keeping pace with inflation |
| Tax-loss harvesting 鈥?you can offset gains with losses | Complexity 鈥?tracking cost basis, holding periods, and wash sale rules can be tedious |
| Primary home exclusion 鈥?up to $250k/$500k gain tax-free | 3.8% surcharge on investment income for high earners |
Common mistakes people make
Mistake 1: Selling too soon without realizing the tax cost
People often sell a stock that has gone up quickly after just a few months. They see the profit but don't account for the fact that they'll lose 22-37% of it to taxes. Waiting until you cross the one-year mark can cut the tax bill by roughly half.
Mistake 2: Ignoring state capital gains taxes
Nine states have no income tax (Alaska, Florida, Nevada, New Hampshire*, South Dakota, Tennessee, Texas, Washington, Wyoming). The rest tax capital gains as income. In California, the top rate is 13.3%. So a California resident in the highest bracket could pay 20% federal + 3.8% NIIT + 13.3% state = 37.1% on long-term gains.
*New Hampshire taxes interest and dividends at 4% (lowering in 2025).
Mistake 3: Forgetting about the wash sale rule
If you sell an investment at a loss and then buy the same or a "substantially identical" investment within 30 days before or after the sale, the loss is disallowed. This rule applies to stocks and mutual funds, and it's commonly tripped up by people trying to tax-loss harvest.
Mistake 4: Not tracking your cost basis correctly
Your cost basis is the original value of the asset plus any commissions, fees, and reinvested dividends. If you reinvest dividends, those purchases have their own cost basis and holding period. Failure to track this means you might overpay or underreport. Most brokers now track this for you if you use their platform.
Mistake 5: Believing you can avoid capital gains tax by giving the asset away
If you gift an appreciated asset to someone, they generally inherit your cost basis. So if you bought at $10,000, gave it to your child, and they sell at $20,000, they owe tax on the full $10,000 gain. The only way to reset the basis is through inheritance 鈥?when someone dies, the assets are "stepped up" to the current market value.
Tools that help you make better decisions
You don't have to guess at these numbers. A few calculators can show you exactly what you'll owe and help you plan ahead.
Capital Gains Calculator 鈥?This is your primary tool. Enter the date you bought an asset, the date you sold it, your purchase price, sale price, and total income. It will show you whether the gain is short-term or long-term, which bracket you fall into, and the exact dollar amount of tax you owe. You can play with different sale dates to see how waiting a few more months changes the tax.
Income Tax Calculator 鈥?Since capital gains stack on top of your regular income, you need to know your full tax picture. This calculator estimates your ordinary income tax including deductions and credits, so you can see how additional gains change your total liability. Use it before selling a large position.
Investment Calculator 鈥?Plan your investment growth over time. This tool shows you how compounding returns work and lets you factor in different tax rates on the back end. If you're deciding between a taxable account and a tax-advantaged account (like an IRA), this comparison helps you see the difference over 10, 20, or 30 years.
Frequently asked questions
What happens if I sell an investment for a loss?
A capital loss can be used to offset capital gains. If you have more losses than gains in a year, you can deduct up to $3,000 of net losses against your regular income ($1,500 if married filing separately). Any remaining losses carry forward to future years. This strategy is called tax-loss harvesting, and it's a legitimate way to reduce your tax bill.
Do I pay capital gains tax if I sell my house?
If it's your primary residence, you can exclude up to $250,000 of gain ($500,000 for married couples filing jointly) as long as you've lived in the home for at least two of the last five years. Any gain above that amount is taxed as a long-term capital gain. Second homes and rental properties don't qualify for this exclusion.
How is cryptocurrency taxed?
The IRS treats cryptocurrency as property. Every time you sell crypto for dollars, trade one coin for another, or use it to buy something, it's a taxable event. Short-term and long-term rules apply the same way as stocks. The one-year holding period starts from when you acquired the crypto. This is a common area where people get into trouble because they don't realize that crypto-to-crypto trades are taxable, even if no fiat currency changes hands.
What's the net investment income tax (NIIT)?
If your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), you pay an additional 3.8% tax on the lesser of your net investment income or the amount you exceed the threshold. This applies to long-term and short-term capital gains, dividends, interest, and rental income. So the top effective rate on long-term gains for a high earner can be 23.8% (20% + 3.8%).
Can I avoid capital gains tax by never selling?
Yes 鈥?you only pay capital gains tax when you sell. If you hold an asset until you die, your heirs receive it with a step-up in basis to the current market value. That means the tax on all the appreciation never gets paid. This is a common estate planning strategy, but it only helps if you can afford to hold the asset until death and you plan to pass wealth to heirs.