Capital Gains

Stock trading dictionary: meaning, example and how traders use it.

Last updated: October 25, 2026

Definition: Capital Gains are the profits realized when you sell an investment, such as a stock, for more than its cost basis. In the US, gains on assets held over one year are generally taxed at lower long-term rates than short-term gains.

How capital gains work

A capital gain equals the sale proceeds minus the cost basis, which is generally what you paid including commissions. While you still hold the position, any increase is an unrealized gain and is not taxed. The gain becomes realized when you sell. If you sell for less than your basis, you have a capital loss.

Gains can come from any capital asset: shares, ETFs, bonds, real estate or precious metals such as those covered in gold bullion investing. Separately, a dividend is income rather than a capital gain, although funds may distribute capital gains to shareholders.

Total return on an investment combines both pieces: price appreciation, which produces capital gains when realized, and income such as dividends or interest. Two investments with the same total return can create very different tax results depending on how much of the return comes from each source and when gains are realized.

Capital gains formula

The basic calculation is:

Capital gain (or loss) = Sale proceeds - Cost basis

Each side includes transaction costs. Sale proceeds are the sale price times the number of shares, minus commissions and fees on the sale. Cost basis is the purchase price times the number of shares, plus commissions and fees on the purchase. The percentage gain is the dollar gain divided by the cost basis.

For example, buying 200 shares at $25 with a $10 commission gives a basis of $5,010. Selling them at $31 with a $10 commission gives proceeds of $6,190. The gain is $6,190 - $5,010 = $1,180, or about 23.6% of the basis. Brokers report proceeds and, for most shares bought after cost-basis reporting rules took effect, the basis as well on annual tax forms, but the investor remains responsible for accuracy.

Short-term vs long-term capital gains

Under US federal rules, a holding period of one year or less produces a short-term gain, taxed at ordinary income rates. Holding for more than one year produces a long-term gain, taxed at preferential rates. The IRS sets the rate thresholds and adjusts them periodically, so check current figures. Frequent strategies such as day trading generate almost entirely short-term gains.

The long-term rate that applies depends on taxable income, and some types of assets, such as collectibles, are subject to different maximum rates. Higher-income taxpayers may also owe an additional tax on net investment income. State income taxes apply on top of federal tax in many states, and most states do not give long-term gains a lower rate.

When an investor has both kinds of gains and losses in the same year, they are netted in steps. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. If one category ends with a net loss, it is then applied against the net gain in the other category. The result determines how much of the year's gain, if any, is taxed at ordinary rates and how much at long-term rates.

Capital gains example

Suppose you buy 100 shares at $50, for a basis of $5,000. Eighteen months later you sell at $65, receiving $6,500. Your realized long-term capital gain is $1,500. If you had sold after eight months instead, the same $1,500 would be a short-term gain.

Now suppose you also sold another stock at a $600 loss in the same year. Capital losses offset capital gains, so your net gain would be $900. Net losses beyond your gains can offset a limited amount of ordinary income, with the remainder carried forward.

How the holding period changes the tax

To see why timing matters, assume purely hypothetical rates of 24% for ordinary income and 15% for long-term gains. The $1,500 short-term gain would cost $1,500 x 24% = $360 in federal tax, while the long-term version would cost $1,500 x 15% = $225. Waiting past the one-year mark saves $135 in this illustration. Actual rates depend on income, filing status, and current law.

Cost basis and holding period details

If you bought shares in several lots at different prices, the lot you sell determines your gain. Brokers commonly default to first-in, first-out, but many let you select specific lots, which can change both the size and the short- or long-term character of the gain. The holding period generally begins the day after purchase and includes the day of sale. Reinvested dividends create new lots with their own basis and dates. Corporate actions such as stock splits adjust the per-share basis without changing the total, and inherited or gifted shares follow special basis rules. Keeping accurate records makes year-end reporting far easier and helps avoid paying tax twice on the same money.

Capital gains distributions from funds

Mutual funds and some ETFs realize gains when they sell holdings inside the fund, and they are generally required to pass net realized gains to shareholders, often near the end of the year. Shareholders in taxable accounts owe tax on these distributions even if they reinvest them and even if they did not sell any fund shares. Capital gain distributions are taxed as long-term gains based on how long the fund held the securities, not how long the investor owned the fund; net short-term gains are generally paid out as ordinary dividends instead.

Buying into a fund just before a large distribution means receiving a taxable payment that is effectively a return of part of the purchase price. ETFs often distribute fewer capital gains than comparable mutual funds because of the way shares are created and redeemed, though this is not guaranteed.

Ways investors manage capital gains

  • Hold longer to qualify for long-term treatment.
  • Tax-loss harvesting: realize losses to offset gains, keeping wash-sale rules in mind. A loss is generally disallowed if you buy a substantially identical security within 30 days before or after the sale.
  • Use tax-advantaged accounts such as an IRA, including a Roth IRA or traditional IRA, where trades do not trigger current capital gains tax.
  • Track your basis for each lot, especially after reinvested dividends.
  • Choose lots deliberately: selling the highest-cost shares first can reduce the taxable gain on a partial sale.
  • Plan around the calendar: gains and losses are counted by tax year, so the timing of a sale near year-end determines which return it lands on.

Tax rules are complex and change; this page is educational, not tax advice. Consider talking to a tax professional before making decisions based on taxes.

Common capital gains mistakes

  • Letting taxes drive every decision: holding a deteriorating position only to reach the one-year mark can cost more in lost value than the tax saved.
  • Forgetting reinvested dividends: failing to add them to basis overstates the gain and leads to paying tax twice.
  • Triggering a wash sale by accident: automatic dividend reinvestment or purchases in another account, including an IRA, can disallow a loss.
  • Overlooking fund distributions when estimating the year's tax bill.
  • Ignoring the whole portfolio: gains and losses from all taxable accounts are netted together, so a sale in one account affects the tax result of another.
  • Misjudging short positions: gains from short selling follow their own holding-period rules and are usually short-term.

Frequently asked questions

How long do I need to hold a stock to get long-term capital gains?

Under US rules, you must hold it for more than one year. A holding period of one year or less produces a short-term gain.

Do I pay capital gains tax if I do not sell?

No. Unrealized gains are generally not taxed. Tax is typically due only when you sell and realize the gain in a taxable account.

Can capital losses offset capital gains?

Yes. Realized capital losses offset realized gains, and excess losses can offset a limited amount of ordinary income each year with the rest carried forward.

How is cost basis calculated?

Cost basis is generally the price paid for the shares plus commissions and fees, adjusted for events such as stock splits and reinvested dividends. Inherited and gifted shares follow special rules.

Are dividends capital gains?

No. Dividends are a form of income paid by the company, while capital gains come from selling an asset for more than its basis. Qualified dividends may, however, be taxed at the same preferential rates as long-term gains.

Do I owe capital gains tax on trades inside an IRA?

No current capital gains tax is due on trades within a traditional or Roth IRA. Withdrawals from a traditional IRA are taxed as ordinary income, while qualified Roth withdrawals are tax-free.

· All terms A–Z ·

For information only, not investment advice. See the disclaimer.