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.