← Learn

How are investment gains taxed, and why does holding longer matter?

Your investments have done well and you’re thinking about selling some, perhaps for a down payment or simply to take profits. Before you do, it helps to know what the sale will cost in tax. The answer depends on how long you’ve held the investment, and waiting a few weeks can sometimes make a real difference.

You’re taxed when you sell, on the gain

In a regular taxable brokerage account, you generally don’t owe tax on investments simply because they rise in value. Tax applies when you sell, and only on the gain: the sale price minus what you paid, including any reinvested dividends, which is called your cost basis.

Dividends and interest are taxed in the year you receive them, whether or not you sell anything.

Retirement accounts like 401(k)s and IRAs work differently. Buying and selling inside them doesn’t create a tax bill; tax applies when you withdraw from traditional accounts, and qualified Roth withdrawals aren’t taxed at all.

Holding period changes the rate

How long you held the investment decides which rate applies.

Gains on investments held one year or less are short-term, and they’re taxed at the same rates as your wages.

Gains on investments held more than a year are long-term, and they’re taxed at lower rates of 0%, 15% or 20%, depending on your taxable income. For 2026, a single filer pays 0% on long-term gains that fall within taxable income up to $49,450, 15% up to $545,500, and 20% above that. For married couples filing jointly, the thresholds are $98,900 and $613,700. Qualified dividends are taxed at the same rates.

Higher earners may also owe a 3.8% net investment income tax on investment income once modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly.

An example

Imagine a single filer with $70,000 of taxable income from wages, who sells an investment for a $10,000 gain.

If they’ve held it for eleven months, the gain is short-term and taxed in the 22% bracket, about $2,200 in federal tax.

If they wait until they’ve held it for more than a year, the gain is long-term and taxed at 15%, about $1,500. Waiting saves about $700, as long as the investment’s price holds up in the meantime.

That last condition matters. Waiting carries the risk that the price falls, and a tax saving isn’t worth much if the gain shrinks by more than the tax difference. It’s a factor to weigh, not a rule to follow.

Losses can offset gains

If you sell investments at a loss, those losses offset your gains. If losses exceed gains, up to $3,000 a year can offset other income, such as wages, and any remaining loss carries forward to future years.

There is a limit worth knowing: if you sell at a loss and buy the same or a substantially identical investment within 30 days before or after, the wash sale rule disallows the loss for now.

Before you sell

Check the purchase date and cost basis for what you plan to sell; your brokerage shows both. If you bought at different times, different shares may have different holding periods and gains, and many brokerages let you choose which shares to sell.

Think about where the money is held. If you have both taxable and retirement accounts, selling within a retirement account doesn’t trigger tax at the time of the sale.

For larger or more complicated sales, especially those that could push you into a higher rate, a tax professional can help you plan the timing.

The takeaway

Investment gains are taxed when you sell, and holding for more than a year usually means a lower rate. Losses can offset gains. Taxes are one factor in deciding when to sell, alongside what you need the money for and how much risk you’re willing to take while you wait.

Sources

Keep reading

This article is general education about US personal finance, based on the assumptions and sources described in it. It isn’t financial, tax or legal advice, and examples use hypothetical people and figures.