Capital Gain
Estimated Federal Tax
Effective Tax Rate
After-Tax Proceeds
Table of Contents
Capital Gains Tax — Short-Term vs Long-Term
How long you hold an investment before selling has a huge impact on your tax bill. Sell within a year and your profit is taxed as ordinary income — up to 37% federally. Hold for more than a year and you qualify for long-term capital gains rates of 0%, 15% or 20%.
This calculator uses the 2025 IRS tax brackets to estimate the federal tax on your gain based on your filing status and other taxable income. State taxes and the 3.8% Net Investment Income Tax are not included — check your state rules and high-income thresholds for the full picture.
How capital gains tax works
When you sell a capital asset — stocks, mutual funds, ETFs, real estate, cryptocurrency, collectibles — for more than your cost basis, the difference is a capital gain. Cost basis is typically the original purchase price plus any commissions or improvements. The gain becomes taxable in the year of sale, not while the asset is appreciating in your account.
The IRS treats capital gains in two distinct categories. Short-term gains, on assets held one year or less, are taxed at your ordinary income tax rate, just like wages. Long-term gains, on assets held more than one year, qualify for preferential tax rates of 0%, 15% or 20% depending on your overall income. The line is drawn at exactly one year and one day of holding — a single day can change your tax rate dramatically.
2025 long-term capital gains rates
For 2025, single filers pay 0% on long-term gains as long as taxable income (including the gain) stays below $48,350. The 15% rate applies between $48,350 and $533,400. The 20% rate kicks in above $533,400. For married couples filing jointly, the thresholds are $96,700 and $600,050. For head of household, $64,750 and $566,700.
These thresholds are based on total taxable income, not gain alone. The gain is stacked on top of your ordinary income, and the appropriate bracket applies to the gain itself. If your ordinary income alone puts you in the 15% LTCG band, the entire gain is taxed at 15% — unless it pushes you into the 20% band, in which case the upper portion is taxed at 20%.
Short-term gains use ordinary income brackets
Short-term capital gains receive no special treatment — they are taxed as ordinary income at the standard 10%, 12%, 22%, 24%, 32%, 35% or 37% federal brackets. For high earners, that can mean paying more than twice the rate they would have paid by waiting one extra day to cross the long-term threshold.
This is why active traders often face surprisingly high tax bills. Frequent buying and selling generates short-term gains that are taxed at full income rates and offer none of the deferral benefits of long-term holding. For taxable accounts, the math overwhelmingly favors holding investments for more than a year whenever possible.
Tax-loss harvesting
Capital losses can offset capital gains dollar-for-dollar. Short-term losses first offset short-term gains, and long-term losses offset long-term gains. Any remaining loss in one category can then be used against the other. If you still have a net loss after all that, you can deduct up to $3,000 against ordinary income each year ($1,500 if married filing separately), and carry the remainder forward to future years indefinitely.
Tax-loss harvesting is the strategy of intentionally selling losing positions to realize the loss for tax purposes. Watch out for the IRS wash-sale rule: if you buy back the same or a "substantially identical" security within 30 days, the loss is disallowed for tax purposes. Many investors swap into a similar but not identical fund to maintain market exposure while still capturing the loss.
The 3.8% Net Investment Income Tax
High earners owe an additional 3.8% Net Investment Income Tax (NIIT) on investment income, including capital gains. The threshold is $200,000 modified adjusted gross income for single filers and $250,000 for married filing jointly. Above those levels, NIIT effectively raises the top long-term capital gains rate from 20% to 23.8%.
NIIT applies only to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. If your gain pushes you above the threshold for the first time, only the portion above counts. This calculator does not include NIIT — add 3.8% mentally if you are clearly above the income thresholds.
Don't forget state taxes
Most states tax capital gains as ordinary income, applying their normal income tax rate. California, for example, taxes long-term gains the same as wages — up to 13.3%, on top of the 20% federal rate plus 3.8% NIIT. Other high-tax states like New York and Hawaii follow similar rules.
A handful of states have no state income tax: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington and Wyoming. Residents of these states pay only federal capital gains tax. The state tax difference can be significant — for an investor in a high-tax state, the all-in rate on a large long-term gain can exceed 35%.
Strategies to reduce capital gains tax
Hold investments for more than a year to qualify for long-term rates. Use tax-advantaged accounts — IRAs, Roth IRAs, 401(k)s — where capital gains are tax-free or tax-deferred. Harvest losses to offset gains. For real estate, the home sale exclusion lets you avoid tax on up to $250,000 of gain ($500,000 married) on a primary residence held two of the last five years. Charitable donations of appreciated securities avoid the gain entirely while still providing a deduction at full market value.
FAQs
A capital gain is the profit from selling an asset — like a stock, mutual fund, real estate or cryptocurrency — for more than you paid for it. The gain equals the sale price minus your cost basis (typically your purchase price plus any commissions or improvements). Capital gains are taxable in the year the asset is sold, not while it appreciates.
Short-term capital gains apply to assets held one year or less and are taxed at your ordinary income tax rate (10–37% federally). Long-term capital gains apply to assets held more than one year and are taxed at the preferential rates of 0%, 15% or 20% depending on your taxable income. Holding investments longer than a year is one of the simplest ways to reduce taxes.
For 2025, long-term capital gains rates for single filers are: 0% on taxable income up to $48,350; 15% from $48,351 to $533,400; and 20% on income above $533,400. For married filing jointly, the brackets are 0% up to $96,700; 15% to $600,050; and 20% above. Head of household: 0% up to $64,750; 15% to $566,700; 20% above.
Long-term capital gains are stacked on top of your ordinary taxable income, then taxed at LTCG rates based on where they fall in the brackets. If your ordinary income already places you in the 15% LTCG bracket, your gain is taxed at 15% (or partially at 20% if it pushes you into that top bracket). The ordinary income portion is unaffected — the LTCG rate applies only to the gain itself.
Most states tax capital gains as ordinary income, meaning your state's regular income tax rate applies on top of federal capital gains tax. A handful of states (Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming) have no state income tax. This calculator estimates federal tax only — check your state's rules for the full picture.
Yes. Capital losses first offset capital gains of the same type (short-term losses against short-term gains, long-term against long-term), then offset gains of the other type. Any remaining net loss can offset up to $3,000 of ordinary income per year ($1,500 if married filing separately), with the unused portion carried forward indefinitely. This strategy is called tax-loss harvesting.
High earners may also owe a 3.8% Net Investment Income Tax (NIIT) on investment income, including capital gains. NIIT applies once modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator does not include NIIT — if your income is near or above these thresholds, your effective rate on capital gains may be 3.8% higher than shown.