Capital Gains Tax Calculator — Estimate Tax on Investment Profits
Calculate long-term and short-term capital gains tax
Reviewed for accuracy June 21, 2026 by Gary S.
Affects your tax bracket
0% capital gains rate — optimal long-term holding bracket
Your income level qualifies for the 0% long-term capital gains rate on this $20,000.00 gain. No federal capital gains tax owed — this is the optimal tax outcome for investment gains.
- ›Net after-tax gain: $20,000.00 — you keep 100% of the $20,000.00 gain
- ›You're in the 0% bracket: consider realizing additional gains this year while still below the $47,025.00 income threshold
Share on r/personalfinance, Twitter/X, or LinkedIn 📊
How to use Capital Gains Tax Calculator
Free capital gains tax calculator. Enter your gain, holding period, and income to see whether long-term (0–20%) or short-term rates apply and exactly how much tax you owe.
A capital gains tax calculator estimates how much tax you owe when you sell an investment, property, or asset at a profit. The tax rate depends on two things: your income and how long you held the asset. Short-term capital gains (held under one year) are taxed as ordinary income — potentially as high as 37%. Long-term capital gains (held one year or more) qualify for preferential rates of 0%, 15%, or 20%, making the holding period one of the most important tax decisions an investor makes.
How to use this Capital Gains Tax Calculator
- 1Enter your purchase price (cost basis) — what you originally paid for the asset, including commissions and fees.
- 2Enter the sale price — what you received when you sold.
- 3Enter the date of purchase and sale, or simply indicate whether you held the asset for more or less than one year.
- 4Enter your total taxable income for the year to determine which capital gains bracket applies.
- 5The calculator shows your gain, applicable tax rate, estimated tax owed, and your after-tax profit.
Long-term vs short-term capital gains tax rates explained
Capital gains are calculated as the difference between your sale price and cost basis. The tax rate applied depends entirely on your holding period and total income. Holding an asset for just one day longer than 12 months can drop your tax rate from 22–37% to 0–20% — making timing one of the highest-value tax strategies available to investors.
| Variable | Meaning |
|---|---|
| Short-term rate | Same as your ordinary income tax bracket (10%–37%) |
| 0% LTCG rate | Taxable income up to $47,025 (single) or $94,050 (married, 2024) |
| 15% LTCG rate | Taxable income $47,026–$518,900 (single, 2024) |
| 20% LTCG rate | Taxable income above $518,900 (single, 2024) |
| Net Investment Income Tax | Additional 3.8% on investment income above $200,000 (single) |
Investment tax calculator example: $50,000 stock gain, held 14 months
- 01Purchase price: $100,000. Sale price: $150,000. Gain: $50,000.
- 02Holding period: 14 months → qualifies for long-term capital gains rates.
- 03Taxable income (other income): $85,000. Total taxable income with gain: $135,000.
- 04LTCG rate: 15% (income in $47,026–$518,900 range for single filer).
- 05Tax owed: $50,000 × 15% = $7,500.
Result
Tax owed on $50,000 gain: $7,500 at long-term rate. If sold after only 11 months (short-term), at 22% ordinary income rate: $11,000. Waiting 3 more months saved $3,500.
What determines your capital gains tax rate?
Holding period
The most controllable factor. Holding exactly one year and one day converts a short-term gain taxed at up to 37% into a long-term gain taxed at 0–20%. This single decision can save tens of thousands on large positions.
Your income level
If your total taxable income falls under $47,025 (single, 2024), your long-term capital gains rate is 0% — you pay nothing on investment profits. Strategic income management can keep you in this bracket.
Cost basis
Accurately tracking your cost basis (purchase price + commissions + reinvested dividends) minimizes reported gains. Poor record-keeping often results in overpaying taxes.
Tax-loss harvesting
Realized capital losses offset gains dollar for dollar. A $10,000 loss harvested in the same tax year as a $10,000 gain eliminates the tax on the gain entirely.
State taxes
Most states do not offer preferential long-term capital gains rates — California taxes capital gains as ordinary income at up to 13.3%. This calculator shows federal tax only.
NIIT surcharge
High earners (above $200,000 single, $250,000 married) pay an additional 3.8% Net Investment Income Tax on top of the standard capital gains rate.
Tips and things to know
- ✓If your total income is below $47,025 (single) or $94,050 (married), your long-term capital gains tax rate is 0% — consider realizing gains in low-income years.
- ✓Tax-loss harvesting: sell losing positions before year-end to offset gains. Up to $3,000 in excess losses can offset ordinary income per year.
- ✓Donate appreciated stock directly to charity instead of selling it first — you avoid the capital gains tax entirely and deduct the full market value.
- ✓Qualified Opportunity Zone investments allow deferral and potential elimination of capital gains tax if held 10+ years.
- ✓For inherited assets, the "step-up in basis" at death resets the cost basis to market value on the date of death — potentially eliminating decades of accumulated gains.
Capital Gains Tax Calculator — bottom line
Capital gains taxes reward long-term investing — the IRS intentionally creates a large tax advantage for assets held over a year. Short-term capital gains (held ≤ 12 months) are taxed as ordinary income: up to 37%. Long-term capital gains (held > 12 months) are taxed at 0%, 15%, or 20% depending on income — a 17-percentage-point difference at the top. This means the decision of when to sell is almost as important as the decision of what to sell. On a $50,000 gain for a single filer with $200,000 in income, the short-term rate costs roughly $19,000 in tax; the long-term rate costs $7,500. Waiting 12 months to sell saves $11,500 on that transaction alone. The most common mistake is selling appreciated assets in high-income years when you could sell them in low-income years instead. If you have a year of unusual income (bonus, business sale, stock option vesting), deferring additional capital gains sales to the following year can move you into a lower long-term gains bracket. Second mistake: ignoring the 0% long-term capital gains rate for lower-income years. Single filers with taxable income under approximately $47,025 pay zero percent on long-term capital gains — this creates planning opportunities for early retirees, sabbatical years, or the transition from employment to retirement. Third: overlooking cost basis tracking. You pay taxes on the gain, not the sale price — and your cost basis determines the gain. Use specific identification rather than FIFO or average cost to choose which tax lots to sell and minimize taxable gains in any given year.
Official resources and further reading
IRS — Topic No. 409: Capital Gains and Losses
Official IRS guidance on capital gains tax rates, holding periods, how to calculate your gain, and reporting requirements.
IRS — Schedule D Instructions (Capital Gains)
IRS Schedule D instructions for reporting capital gains and losses on your federal tax return, with worked examples.
SEC — Tax Information for Investors
The SEC's investor education resource on capital gains, basis tracking, and tax considerations when selling investments.
Related tools you might need
Frequently asked questions
0% for income up to $47,025 (single). 15% up to $518,900. 20% above $518,900. Holding assets for at least 1 year qualifies for these preferential rates.
From our guides
All guides →Three-Fund Portfolio Explained: The Complete 2026 Guide
The three-fund portfolio uses VTI (US stocks), VXUS (international), and BND (bonds) to cover the entire global market at 0.03–0.07% expense ratio. This guide explains allocation by age, fund options at every broker, and why asset allocation drives 91% of long-run returns.
VOO vs VTI vs FZROX: Which ETF Should You Choose in 2026?
VOO holds 500 large-cap stocks. VTI holds ~3,800 US companies. FZROX holds ~2,500 at 0% expense ratio. Their 10-year returns differ by only 0.1–0.4%. Here's which to choose based on your broker, account type, and whether portability matters.
Best ETF Allocation by Age: The Complete 2026 Framework
ETF allocation shifts from 80–90% stocks in your 20s to 45–55% by retirement. This guide covers the full allocation matrix by decade and risk tolerance (conservative/moderate/aggressive), with specific VTI/VXUS/BND percentages and the sequence-of-returns math behind the shift.
Next logical step
As your investments grow, revisit your cash survival baseline. Your liquidity runway should scale with your assets — not stay frozen at the number you set years ago.
Emergency Fund Calculator
Calculate your emergency fund target and time to reach it
Educational content only — not financial advice
The tools and calculators on Garypedia are provided solely for informational and educational purposes. They do not constitute financial, investment, tax, accounting, or legal advice of any kind. While reasonable care is taken to ensure the accuracy of formulas, figures, and data sources referenced, no warranty — express or implied — is made as to their completeness or suitability for any particular purpose. Garypedia, its operators, and contributors expressly disclaim all liability for any loss, damage, or adverse outcome — whether direct, indirect, or consequential — arising from reliance on any result produced by these tools. All outputs are estimates based on the inputs you provide; individual circumstances vary significantly. You should independently verify any figures and seek guidance from a suitably qualified and regulated financial, tax, or legal professional before making any financial decision.