Calculate your capital gains tax owed: Capital Gains Tax Calculator →
Short-Term vs. Long-Term: The Most Important Distinction
The IRS taxes capital gains at dramatically different rates based on how long you held the asset before selling. Assets sold within 12 months of purchase are taxed at your ordinary income rate — the same rate as your wages. Assets held for more than 12 months receive the long-term capital gains rate, which is significantly lower.
For 2026: long-term rates are 0%, 15%, or 20% depending on total income. Short-term rates match ordinary income brackets: 10%, 12%, 22%, 24%, 32%, 35%, or 37%. A single day makes the difference. An investor in the 24% bracket selling a stock held 364 days pays 24% on the gain. Selling the same stock at 366 days pays 15% — a 9% reduction on what could be a very large number.
How to Calculate Your Capital Gain
Capital gain = Sale proceeds − Cost basis. Cost basis is your original purchase price plus any commissions or fees paid at purchase. For stocks and funds, dividends that were reinvested (DRIP) increase your cost basis — each reinvestment is a new purchase at the price on that date. Tracking this accurately prevents you from overpaying taxes by reporting a larger gain than you actually had.
Cost Basis Methods
When you've purchased shares of the same stock or fund at different prices over time, you must choose a cost basis method to determine which shares you're selling:
- FIFO (First In, First Out): Default for most brokerages. Oldest shares sold first.
- Specific Identification: You designate which specific shares are sold. Allows optimizing for tax by choosing the highest-cost shares to minimize the gain.
- Average Cost: Average of all purchase prices. Common for mutual funds.
Specific identification is the most powerful method — when you have shares with different bases, choosing to sell the highest-cost lots minimizes the current gain (and tax). Keep records of every purchase date and price to use this method.
Tax-Loss Harvesting: Using Losses to Your Advantage
When a taxable account holding has declined in value, selling it "harvests" a capital loss. This loss can offset capital gains dollar-for-dollar, reducing your tax bill. Net capital losses remaining after offsetting all gains can reduce ordinary income by up to $3,000 per year, with excess losses carrying forward indefinitely to future tax years.
The key to effective tax-loss harvesting: reinvest the proceeds immediately in a similar but not substantially identical investment to maintain market exposure. The goal is to keep your portfolio allocation the same while realizing the tax benefit of the loss. The tax saving is real — the investment loss is effectively being paid by Uncle Sam.
The Wash-Sale Rule
The wash-sale rule is the primary constraint on tax-loss harvesting. You cannot deduct a loss if you buy a "substantially identical" security within 30 days before or after the sale. The IRS hasn't defined "substantially identical" exhaustively, but selling a specific stock and buying the same stock is clearly prohibited. Selling one S&P 500 ETF and buying a different S&P 500 ETF from a different issuer is a gray area. Selling a total US market ETF (like VTI) and buying a total US market ETF with slightly different composition (like SCHB) is generally considered acceptable.
Inherited Assets: The Step-Up in Basis
One of the most valuable tax provisions in the US tax code: when you inherit an asset, the cost basis "steps up" to the fair market value on the date of the original owner's death. All capital gains that accumulated during the original owner's lifetime are permanently eliminated — you never pay tax on that appreciation. Only gains after the date of inheritance are taxable when you eventually sell.
Example: Your parent bought Apple stock for $5,000 in 2010. It's worth $85,000 when they die. You inherit it with a $85,000 cost basis. If you sell immediately, you owe $0 in capital gains tax. If you hold it and sell at $90,000, you owe tax only on the $5,000 gain above your $85,000 inherited basis.
| Strategy | How It Works | Benefit |
|---|---|---|
| Hold >1 year | Wait 366+ days before selling | Short-term to long-term rate (up to 22%+ savings) |
| Tax-loss harvesting | Sell losers, reinvest in similar funds | Offset gains + $3K ordinary income/yr |
| Specific identification | Sell highest-cost lots first | Minimize current gain on partial sales |
| 0% bracket harvesting | Sell gains in low-income years | Realize gains at 0% for qualifying income |
| Donate appreciated stock | Give stock to charity instead of cash | Deduct full market value, pay no capital gains tax |
For the exact tax owed on a specific investment sale at your income level, use the Capital Gains Tax Calculator. For broader tax-efficient investing strategies including asset location and account selection, read tax-efficient investing.
Related Articles
Frequently Asked Questions
How do capital gains taxes work?
When you sell an asset for more than you paid, the profit is a capital gain. Gains on assets held more than 1 year are taxed at 0%, 15%, or 20% (long-term rates). Gains on assets held 1 year or less are taxed as ordinary income (10%–37%). Capital gain = sale price − cost basis (what you paid plus commissions).
What is the 2026 long-term capital gains tax rate?
0% if total taxable income is under $47,025 (single) or $94,050 (married). 15% up to $518,900 (single) or $583,750 (married). 20% above those levels. An additional 3.8% Net Investment Income Tax applies for incomes over $200K (single) or $250K (married).
What is the wash-sale rule?
You cannot deduct a capital loss if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss adds to the replacement security's basis. Avoid the rule by buying a similar but not identical investment — switching ETF providers for the same broad market exposure is generally acceptable.
What is stepped-up basis for inherited assets?
Inherited assets get a new cost basis equal to the fair market value on the date of death. All gains from the original owner's holding period are permanently tax-free. Only post-inheritance appreciation is taxable when you sell. This is one of the most powerful tax provisions for estate planning.
Can I avoid capital gains tax entirely?
Legally: yes in some cases. Hold assets in Roth accounts (gains are never taxed). Use the 0% long-term bracket in low-income years (gains up to $47K single). Donate appreciated stock directly to charity (deduct full value, no capital gains tax). Step up basis through estate (heirs inherit with no prior gain). Hold primary residence gain exclusion ($250K single/$500K married on home sales).