Capital Gains Holding Period Calculator

Compare the tax owed if you sell today at ordinary income rates against waiting for long-term capital gains treatment, and see how many days remain until you qualify.

Inputs

$
$
%

Your federal marginal bracket rate for ordinary income.

%

Statutory LTCG rates are 0%, 15%, or 20% depending on taxable income. // TODO: VERIFY thresholds from IRS Rev. Proc. 2024-61

The Net Investment Income Tax applies above certain thresholds. // TODO: VERIFY exact 2025 NIIT threshold from IRS Rev. Proc. 2024-61

Results update as you type, and the address bar keeps your numbers so the link you share reopens this exact calculation.

Tax savings from long-term treatment

$5,100

Waiting 166 more days unlocks this saving.

Detailed results
Short-term capital gains tax$9,600
Long-term capital gains tax$4,500
ST after-tax gain$20,400
LT after-tax gain$25,500
Days remaining for LT treatment166

What this result means

Tax savings from long-term treatment: $5,100.

You have held this position for 200 days. Waiting 166 more days (to day 366) qualifies the gain for long-term capital gains rates and saves you $5,100 in federal tax compared with selling today.

Holding Period Timeline

Simplified tax impact at three milestones, assuming fair market value stays constant.

Holding Period Timeline. 3 rows, first 3 shown.
MilestoneDays heldTax owedAfter-tax gain
Today (current)200$9,600$20,400
Long-term threshold (day 366)366$4,500$25,500
1 year held (day 365)365$4,500$25,500

How this is calculated

gain = current_fmv - cost_basis
st_tax = gain × ordinary_income_rate
lt_effective_rate = ltcg_rate + (include_niit ? 3.8% : 0%)
lt_tax = gain × lt_effective_rate
tax_savings = st_tax - lt_tax

Short-term vs long-term capital gains

When you sell a capital asset such as a stock, bond, or piece of real estate, the IRS classifies the resulting gain as either short-term or long-term depending on how long you owned the asset before selling. If you held the asset for 365 days or fewer, the gain is short-term and taxed as ordinary income — at the same rates as your salary, which can reach 37% federally. If you held the asset for 366 days or more (more than one year), the gain is long-term and taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income for the year.

The rate differential

The spread between ordinary and long-term rates can be substantial. A taxpayer in the 32% ordinary bracket who qualifies for the 15% long-term rate saves 17 cents on every dollar of gain. On a $100,000 gain, that is $17,000 in additional take-home money — simply for waiting a few more months. This calculator lets you see your personal dollar amount of tax savings before you decide to sell.

NIIT surcharge for high-income taxpayers

Higher-income taxpayers face an additional 3.8% Net Investment Income Tax (NIIT) on top of the regular long-term rate. This tax applies to the lesser of net investment income or the amount by which modified adjusted gross income exceeds a statutory threshold (approximately $200,000 for single filers and $250,000 for married filing jointly, though you should verify the exact 2025 figures from IRS Rev. Proc. 2024-61). When NIIT applies, the effective long-term rate rises to 18.8% or 23.8% rather than 15% or 20%.

Wash sale rule relevance

If you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss under the wash sale rule. While this calculator focuses on gains rather than losses, the wash sale rule is relevant context: some investors deliberately hold appreciated stock longer to flip from short-term to long-term treatment, but they may also be tempted to harvest offsetting losses — and that strategy can go wrong if replacement shares are purchased too quickly.

Gifting appreciated stock

Rather than selling appreciated stock, you can donate shares directly to a qualified charity or transfer them to a donor-advised fund. The charitable deduction equals the full fair market value on the transfer date, and neither you nor the charity owes capital gains tax on the embedded gain. This strategy is most powerful with long-term appreciated stock, because donating short-term appreciated shares limits the deduction to your cost basis.

What this calculator does not include

State income taxes are excluded. Many states tax capital gains as ordinary income regardless of holding period; California, for example, provides no preferential rate for long-term gains. A complete analysis requires adding your state's rate to the federal figures shown here. This calculator also assumes the fair market value does not change between now and the long-term threshold date, which is a simplification — actual price movements could alter the analysis significantly.

Assumptions

  • State and local income taxes are not included; add your state rate separately for a complete estimate.
  • Fair market value is assumed to remain unchanged between today and the long-term threshold date. Real price movements will alter the actual tax savings.
  • NIIT threshold values are not confirmed for 2025. // TODO: VERIFY exact 2025 NIIT thresholds from IRS Rev. Proc. 2024-61
  • Long-term capital gains rates (0%, 15%, 20%) and income thresholds are statutory. The rate you enter should reflect your expected bracket; this calculator does not run the full bracket table.
  • No deductions, credits, or alternative minimum tax adjustments are applied.

Frequently asked questions

How long must I hold an asset for long-term capital gains treatment?

You must hold the asset for more than one year — that is, at least 366 days — before the date of sale. Holding for exactly 365 days still results in a short-term gain taxed at ordinary income rates.

What is the Net Investment Income Tax (NIIT)?

The NIIT is a 3.8% surtax on investment income — including capital gains, dividends, and interest — for taxpayers whose modified adjusted gross income exceeds a statutory threshold. As of 2025, the thresholds are approximately $200,000 for single filers and $250,000 for married filing jointly; verify exact figures from IRS Rev. Proc. 2024-61 or Publication 550.

Are state taxes included in this calculator?

No. This calculator shows federal tax only. State treatment varies widely: some states have no income tax, others tax long-term gains at the same rate as ordinary income (e.g., California), and a few offer a partial exclusion. Add your state's rate separately for a complete picture.

What if my gain is inside a tax-advantaged account like an IRA or 401(k)?

Capital gains inside tax-deferred accounts (traditional IRA, 401(k)) are not taxed when realised. All withdrawals are eventually taxed as ordinary income regardless of what generated the growth. Gains inside a Roth account are generally tax-free in retirement. The holding period distinction only applies to taxable brokerage accounts.

How does the wash sale rule affect my decision to sell?

The wash sale rule disallows a loss if you buy a substantially identical security within 30 days before or after the sale. It does not affect gains directly, but it is relevant when combining a gain sale with a loss harvest elsewhere in your portfolio. Selling a gain position and immediately repurchasing resets your holding period clock to day 1.

Related calculators and guides