When you sell an investment, such as a stock, fund or cryptocurrency, for more than you paid, the profit is a capital gain, and it's usually taxable. But not all gains are taxed the same. The single biggest factor is how long you owned the investment.

Short-term vs. long-term

  • Short-term capital gains: investments held one year or less. These are taxed as ordinary income, at the same rate as your paycheck, which can be as high as 37% at the federal level.
  • Long-term capital gains: investments held more than one year. These get lower federal rates of 0%, 15% or 20%, depending on your taxable income. Most people with a long-term gain pay 15%.

High earners may also owe an additional 3.8% Net Investment Income Tax, and most states tax capital gains too.

An example

Say you have a $10,000 gain, and you're in the 24% federal tax bracket:

  • Sell after 11 months (short-term): about $2,400 in federal tax
  • Sell after 13 months (long-term at 15%): about $1,500 in federal tax

Waiting a couple of months saves about $900.

Watch the date: "Long-term" means held more than one year. Selling exactly on your one-year anniversary still counts as short-term. Check your purchase date before you sell.

How your gain is calculated

Your gain is the sale price minus your cost basis, which is generally what you paid, including certain fees. If you bought shares at different times, your broker tracks the basis for each lot. Reinvested dividends add to your basis, so make sure they're counted, or you could pay tax twice.

Losses can lower your taxes

If you sell an investment for less than you paid, that capital loss can offset capital gains. If your losses exceed your gains, you can generally deduct up to $3,000 a year against ordinary income ($1,500 if married filing separately), and carry any remaining loss forward to future years.

Some investors use tax-loss harvesting: selling losing investments to offset gains. Beware the wash-sale rule: if you buy the same or a "substantially identical" investment within 30 days before or after selling at a loss, the loss is disallowed for now.

Other ways to reduce capital gains tax

  • Use tax-advantaged accounts. Trades inside a 401(k) or IRA don't trigger capital gains tax each year.
  • Hold for the long term when it fits your plan.
  • Mind your income. In years when your taxable income is low, you might qualify for the 0% long-term rate.
  • Selling your home? If you meet ownership and residency tests, generally having lived there two of the last five years, you can exclude up to $250,000 of gain ($500,000 for married couples filing jointly).

The bottom line

Holding an investment for more than a year can cut your federal tax rate on the gain dramatically. Track your purchase dates and cost basis, use losses wisely and let tax-advantaged accounts do some of the work. Just don't let taxes alone override a sound investment decision.

This article is general information, not tax advice. Tax rules and income thresholds change; check IRS.gov or consult a tax professional about your situation.