Short-Term vs Long-Term Tax on Stocks, Real Estate & Investments
Last reviewed: April 2026
A capital gains tax calculator estimates the federal and state taxes owed when you sell an asset for a profit. It distinguishes between short-term gains (taxed as ordinary income) and long-term gains (taxed at preferential rates of 0%, 15%, or 20%), and factors in your filing status and income bracket.
Capital gains tax applies when you sell an asset for more than you paid for it. The tax rate depends on two critical factors: how long you held the asset and your total taxable income. This distinction between short-term and long-term gains can mean the difference between a 0% tax rate and a 37% tax rate on the same gain. Understanding these rules is essential for any investor, homeowner, or anyone selling appreciated property. For a complete view of your tax liability including ordinary income, use our Tax Estimator and Tax Bracket Calculator.
Assets held for one year or less are taxed as ordinary income (10–37% depending on your tax bracket). Assets held for more than one year qualify for preferential long-term rates: 0% for single filers with taxable income under $47,025 (2025), 15% for income up to $518,900, and 20% above that. High-income taxpayers may also owe the 3.8% Net Investment Income Tax (NIIT) if their modified adjusted gross income exceeds $200,000 (single) or $250,000 (married). This tax applies on top of the capital gains rate. Plan your investment sales strategically using our Stock Profit Calculator and track your overall portfolio performance with our Dividend Calculator.
Tax-loss harvesting involves selling losing investments to offset gains, reducing your tax bill. You can offset unlimited capital gains and deduct up to $3,000 in net losses against ordinary income per year, carrying forward excess losses indefinitely. Other strategies include holding assets in tax-advantaged accounts (Roth IRA, 401k), gifting appreciated assets to charity (avoiding gains entirely and getting a deduction), using the primary residence exclusion ($250K/$500K), and timing sales in lower-income years. For retirement account strategies, see our Roth Conversion Calculator and Retirement Calculator.
Real estate has special rules. Your cost basis includes the purchase price plus improvements (new roof, renovations), minus depreciation claimed on rental properties. The primary residence exclusion lets you exclude up to $250,000 in gains ($500,000 married filing jointly) if you've lived in the home for at least 2 of the past 5 years. Investment properties don't get this exclusion but can defer gains through a 1031 exchange into a like-kind property. Rental property owners also face depreciation recapture tax at 25% on the depreciation they've claimed. Analyze your home sale with our Home Sale Net Proceeds Calculator and Home Affordability Calculator.
| Filing Status | 0% Rate (up to) | 15% Rate (up to) | 20% Rate (above) |
|---|---|---|---|
| Single | $47,025 | $518,900 | $518,900+ |
| Married Filing Jointly | $94,050 | $583,750 | $583,750+ |
| Head of Household | $63,000 | $551,350 | $551,350+ |
| Short-Term (any income) | Taxed as ordinary income (10–37%) | ||
Capital gains taxes apply when you sell an asset for more than you paid. The rate depends entirely on how long you held the asset. Short-term capital gains — from assets held one year or less — are taxed at ordinary income rates, meaning up to 37% at the highest federal bracket. Long-term capital gains — from assets held longer than one year — receive preferential tax treatment at 0%, 15%, or 20% depending on your total taxable income. For a single filer in 2025, long-term gains are taxed at 0% on taxable income up to $47,025, 15% up to $518,900, and 20% above that threshold. The Net Investment Income Tax (NIIT) adds an additional 3.8% surtax on investment income for single filers with modified AGI above $200,000 ($250,000 for joint filers), bringing the maximum effective long-term rate to 23.8%. Understanding these rates is essential for timing asset sales and managing your annual tax liability.
| Gain Amount | Taxable Income | Short-Term Tax | Long-Term Tax | Tax Saved by Waiting |
|---|---|---|---|---|
| $10,000 | $50,000 | $2,200 (22%) | $1,500 (15%) | $700 |
| $25,000 | $100,000 | $5,500 (22%) | $3,750 (15%) | $1,750 |
| $50,000 | $200,000 | $16,000 (32%) | $7,500 (15%) | $8,500 |
| $100,000 | $400,000 | $35,000 (35%) | $15,000 (15%) | $20,000 |
| $100,000 | $600,000 | $37,000 (37%) | $23,800 (20%+NIIT) | $13,200 |
The tax savings from holding assets for at least 366 days before selling can be enormous — $20,000 on a $100,000 gain for a high-income taxpayer. This creates a strong incentive to plan sales around the long-term holding period threshold. Use our Tax Bracket Calculator to determine your marginal rate and the tax impact of selling at different income levels.
Tax-loss harvesting involves selling investments at a loss to offset capital gains, reducing your tax liability. If you realize $30,000 in long-term gains and $10,000 in losses during the same year, you pay tax on only $20,000 in net gains. Losses exceeding gains can offset up to $3,000 of ordinary income per year, with unused losses carried forward indefinitely. The wash sale rule prohibits claiming a loss if you repurchase a "substantially identical" security within 30 days before or after the sale. This means you cannot sell a stock to harvest the loss and immediately rebuy the same stock — but you can purchase a similar (not identical) ETF or fund to maintain market exposure while capturing the tax benefit. Systematic harvesting throughout the year is more effective than a single year-end review because market volatility creates loss-harvesting opportunities that may disappear by December.
When you own multiple lots of the same asset purchased at different prices, the cost basis method you choose determines which shares are considered "sold" and therefore the taxable gain or loss. FIFO (first in, first out) sells the oldest shares first — advantageous when older shares have a lower cost basis and you want to realize gains at long-term rates. Specific identification allows you to choose exactly which shares to sell, maximizing tax efficiency by selecting the highest-cost-basis shares to minimize gains (or the lowest-cost-basis shares to maximize losses for harvesting). Average cost basis averages all purchase prices and is commonly used for mutual fund shares. For actively managed portfolios, specific identification provides the greatest tax control and should be elected with your broker before your first sale. The difference between methods can save thousands in taxes on a single transaction.
One of the most significant provisions in the tax code is the step-up in basis at death: when you inherit an asset, your cost basis resets to its fair market value on the date of the decedent's death. If your parent purchased stock for $10,000 decades ago and it is worth $500,000 at death, your basis as the heir is $500,000 — the $490,000 in gains is never taxed. This rule makes holding highly appreciated assets until death an extremely tax-efficient estate planning strategy. The combination of step-up in basis with the estate tax exemption ($13.61 million per person in 2025) means most families can pass appreciated assets with zero capital gains tax and zero estate tax. For this reason, donating highly appreciated assets to charity (deducting the full market value without paying gains tax) and holding other appreciated assets for heirs is a cornerstone of tax-aware wealth transfer. Use our Net Worth Calculator to track your overall financial position.
Primary residence sales qualify for the most generous capital gains exclusion in the tax code: up to $250,000 in gains excluded for single filers ($500,000 for married filing jointly) if you have owned and lived in the home for at least 2 of the past 5 years. This exclusion can be used repeatedly — roughly every two years — making it a powerful tax-free wealth accumulation strategy for homeowners in appreciating markets. The exclusion applies automatically and does not need to be reported if the gain is below the threshold. Gains exceeding the exclusion are taxed at long-term capital gains rates. For investment properties, a 1031 exchange allows indefinite deferral of capital gains by reinvesting proceeds into a like-kind property of equal or greater value within specific timeframes — a strategy widely used by real estate investors to compound returns without triggering taxes at each sale.
See also: Tax Estimator · Tax Bracket Calculator · Stock Profit Calculator · Roth Conversion Calculator · Home Sale Net Proceeds
→ Long-term gains are taxed much lower. Assets held over one year qualify for long-term rates: 0%, 15%, or 20% depending on income. Short-term gains are taxed as ordinary income (up to 37%). Holding just one extra day past the one-year mark can save thousands.
→ Use losses to offset gains. Capital losses offset gains dollar-for-dollar. If you have $10K in gains and $7K in losses, you only pay tax on $3K. Excess losses can deduct up to $3,000 from ordinary income per year, with the rest carried forward.
→ Don't forget state taxes. California taxes capital gains at regular income rates (up to 13.3%). Florida and Texas have no state income tax on gains. Factor in your state's treatment when planning sales.
→ Track your cost basis carefully. Include all purchase commissions, improvement costs (for real estate), and reinvested dividends. A higher cost basis means a smaller taxable gain. Use our Tax Calculator for full income tax planning.
See also: Tax Calculator · ROI Calculator · Inflation Calculator · Compound Interest
Tax-loss harvesting is a powerful strategy for reducing your capital gains tax burden, but the IRS wash sale rule creates an important constraint. If you sell a security at a loss and purchase a substantially identical security within 30 days before or after the sale, the loss is disallowed for tax purposes. The disallowed loss is added to the cost basis of the replacement security, deferring rather than eliminating the tax benefit. This 61-day window (30 days before, the sale date, and 30 days after) applies across all your accounts, including IRAs, making it difficult to work around without careful tracking.
Effective loss harvesting requires a systematic approach. Identify holdings with unrealized losses throughout the year rather than only at year-end. When harvesting a loss, replace the sold position with a similar but not identical security — for example, swapping one S&P 500 index fund for a total stock market fund. This maintains your market exposure while realizing the tax loss. Harvested losses offset gains dollar-for-dollar, and up to $3,000 in excess losses can offset ordinary income each year. Remaining losses carry forward indefinitely. Over a multi-decade investment horizon, consistent loss harvesting can add meaningful after-tax returns to a portfolio.