Selling Stocks This Year? Short vs Long-Term Gains Tax
June 5, 2026 · 3 min read

Selling Stocks This Year? Short vs Long-Term Gains Tax

One extra day of holding a stock can be the difference between paying 37% and 20% on your profit, yet most retail investors only learn this after filing.

By the Online Calculator Base editorial team

The 366-Day Rule That Changes Everything

The IRS splits capital gains into two buckets based purely on how long you held the asset. Hold it 365 days or fewer and you pay your ordinary income tax rate on the profit. Hold it 366 days or more and you qualify for the long-term rate, which tops out at 20% for most high earners and drops to 0% for single filers earning under roughly $47,000 in 2024.

That gap is enormous in practice. Say you bought $20,000 of a tech stock and it grew to $35,000, giving you a $15,000 gain. If you sold on day 364 and you're in the 32% income bracket, you owe $4,800. Wait two more days and that bill falls to $2,250 at the 15% long-term rate. Two days, $2,550 saved.

Where Investors Get the Math Wrong

A surprisingly common mistake is assuming the capital gains rate applies to the entire sale price, not just the profit. If you sell shares for $35,000 that you originally paid $20,000 for, only $15,000 is taxable. The $20,000 cost basis is yours tax-free. Mixing up the two can make investors overestimate their liability and sell less than they should, or panic unnecessarily. Try the capital gains tax estimator to see your own numbers.

Another misconception involves state taxes. The federal long-term rate gets most of the attention, but states like California tax capital gains as ordinary income regardless of how long you held the asset. A California resident in the top bracket could owe a combined federal and state rate above 33% even on a long-term gain. Running the numbers with your state included almost always produces a bigger bill than people expect.

This is exactly where a capital gains tax calculator saves real time. Instead of pulling out tax tables and cross-referencing state rates by hand, you can plug in your purchase price, sale price, holding period, income bracket, and state to get a fast, accurate estimate of what you actually owe.

Timing a Sale Around Life Events

Tax year income matters more than most people realize when planning a sale. If you took a sabbatical, retired mid-year, or had a business loss that reduced your taxable income, you might temporarily fall into a lower bracket. For 2024, married filers with taxable income up to about $94,000 pay 0% on long-term gains. A carefully timed sale in a low-income year could wipe out a federal tax bill entirely.

Similarly, people who inherit investments benefit from a stepped-up cost basis, meaning the asset's value is reset to the market price on the date of inheritance. If you inherit shares that a parent bought for $5,000 and they're now worth $40,000, you owe zero capital gains tax on that $35,000 appreciation if you sell immediately. Many heirs don't know this and either hold assets they don't want or pay an accountant to tell them what a quick calculation could have shown.

A Quick Worked Example Before You Sell

Take a married couple filing jointly with $180,000 in combined wages. They want to sell rental property purchased in 2018 for $250,000, now worth $420,000. The $170,000 gain qualifies as long-term. At the 15% federal rate, that's $25,500 to the IRS. But they also need to factor in depreciation recapture, which is taxed at 25%, plus their state rate. The total bill could easily reach $40,000 or more, which dramatically changes whether selling this year makes sense.

Before making any decision like this, use the capital gains tax estimator to stress-test different scenarios. What if you sold half now and half next year after one spouse retires? What if you did a 1031 exchange instead? Knowing the baseline tax number first gives you a real starting point for that conversation with a financial advisor.