Capital gains are profits from selling assets: stocks, real estate, crypto, bonds, or any investment. The IRS taxes them differently depending on how long you held the asset before selling. Understanding this is worth real money โ the difference between short-term and long-term treatment on a $50,000 gain can be $5,000โ10,000 in taxes.
Short-Term vs Long-Term Capital Gains
If you hold an asset for 12 months or less, the profit is a short-term capital gain โ taxed at your ordinary income tax rate, which can be as high as 37%. If you hold for more than 12 months, the profit is a long-term capital gain โ taxed at 0%, 15%, or 20% depending on your income.
- โข0% long-term rate: single filers under $47,025 / married under $94,050 (2026)
- โข15% long-term rate: single $47,025โ$518,900 / married $94,050โ$583,750
- โข20% long-term rate: income above those thresholds
- โขShort-term gains: same as ordinary income (10%โ37%)
- โขNet Investment Income Tax (NIIT): additional 3.8% if income exceeds $200k single / $250k married
If you are in the 0% long-term capital gains bracket, you can "harvest gains" โ sell appreciated investments and immediately buy them back to reset your cost basis tax-free. This is the opposite of tax-loss harvesting and is underused.
Real Example: Selling 12 Months vs 13 Months
You buy $20,000 of stock. It rises to $50,000 โ a $30,000 gain. You are in the 22% ordinary income tax bracket (15% long-term rate).
- โขIf you sell after 11 months: short-term gain, 22% tax = $6,600 owed
- โขIf you wait until month 13: long-term gain, 15% tax = $4,500 owed
- โขThe one-month wait saves: $2,100
Tax-Loss Harvesting
When an investment is down, you can sell it to realize the loss, then buy a similar (not identical) investment. The realized loss offsets capital gains dollar for dollar. If losses exceed gains, up to $3,000 of excess losses can offset ordinary income per year, with unlimited carryforward.
The wash-sale rule prevents abuse: you cannot buy the same security within 30 days before or after the sale. You can buy a similar fund immediately โ selling VTI and buying ITOT achieves the same market exposure while capturing the tax loss.
Tax-Loss Harvesting in Practice
Here is a real example. You have a $10,000 gain in Apple stock and a $4,000 loss in an energy ETF. Selling the energy ETF harvests the $4,000 loss, which offsets your Apple gain โ reducing your taxable gain to $6,000. If you're in the 15% long-term bracket, that saves you $600 in taxes. You then immediately buy a similar (but not identical) energy ETF to maintain your market exposure. The wash-sale rule only prohibits buying the exact same security or a "substantially identical" one within 30 days.
Net Investment Income Tax (NIIT) for High Earners
If your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly), an additional 3.8% Net Investment Income Tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold. This means high earners effectively pay 18.8% or 23.8% on long-term capital gains โ not just 15% or 20%. The NIIT applies to capital gains, dividends, rental income, and passive business income.
State Capital Gains Taxes
Federal capital gains rates get all the attention, but state taxes apply too โ and several states treat capital gains as ordinary income. California taxes all capital gains as regular income (up to 13.3%). New York tops out at 10.9%. States with no income tax (Texas, Florida, Nevada, Washington) charge zero. If you live in a high-tax state and have a large pending gain, understanding your combined federal + state effective rate is essential. Use the Capital Gains Calculator on CalcVerseAI to estimate your total tax bill, including state.
Real Estate Capital Gains Exception
If you sell your primary residence, you can exclude up to $250,000 of gain from taxes ($500,000 if married filing jointly) โ as long as you have lived in it for 2 of the last 5 years. This is one of the largest legal tax breaks available to ordinary Americans.
The most important capital gains strategy for most investors: hold for more than 12 months, use tax-advantaged accounts (401k, IRA, HSA) for assets with high expected returns, and keep taxable accounts for index funds with low turnover.
Frequently Asked Questions
What is the difference between short-term and long-term capital gains tax?
Short-term capital gains (assets held 12 months or less) are taxed as ordinary income โ up to 37% federally. Long-term capital gains (assets held more than 12 months) are taxed at 0%, 15%, or 20% depending on your income. For a taxpayer in the 22% income tax bracket, waiting just one extra month to hit the long-term threshold can save 7 percentage points on every dollar of gain.
Estimate your capital gains tax โWhat is the wash-sale rule and how does it affect tax-loss harvesting?
The wash-sale rule prevents you from claiming a tax loss if you buy the same or "substantially identical" security within 30 days before or after the sale. To harvest a tax loss legitimately, sell the position and immediately buy a similar but not identical investment โ for example, sell one S&P 500 ETF and buy a different S&P 500 ETF. This maintains your market exposure while locking in the tax deduction.
Do I owe capital gains tax if I sell my home?
Not necessarily. The primary residence exclusion lets you exclude up to $250,000 of gain ($500,000 if married filing jointly) if you have owned and lived in the home for 2 of the last 5 years. Gains above the exclusion are taxed at long-term capital gains rates. This is one of the most significant tax benefits in the US tax code.
What is the Net Investment Income Tax (NIIT)?
The NIIT is an additional 3.8% federal tax on investment income โ including capital gains, dividends, and rental income โ for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). High earners effectively pay 18.8% or 23.8% on long-term gains, not just 15% or 20%.