Plain-English investing notes, one idea at a time — every number checked against a primary source.

Investing BasicsGlossary

Capital gain

A capital gain is the profit when you sell an investment for more than it cost you. Plain-English definition, a worked example and U.S. tax basics.

Also called: realized gain, capital gains

A stone cottage beside a country road
“Cross Keys House, Fovant - geograph.org.uk - 4556589” by Derek Harper — CC BY-SA 2.0 (edited: cropped, recolored)

Quick answer

A capital gain is the profit you make when you sell an investment, such as a stock or fund share, for more than you paid for it. If you sell for less, the difference is a capital loss. In the U.S., the tax depends on how long you held it.

What is a capital gain?#

The SEC's Investor.gov glossary defines a capital gain as the profit that comes when an investment is sold for more than the price the investor paid for it[1]. It is one of the two main ways stockholders earn money; Investor.gov calls a rise in a stock's price capital appreciation, alongside dividends[2].

Until you sell, a rise in price is an unrealized gain: it exists on paper and can disappear if the price falls. Selling realizes the gain. For U.S. tax purposes, the IRS describes the gain or loss as the difference between your adjusted basis in the asset and the amount you realized from the sale[3].

How do you calculate a capital gain?#

Start with your cost basis. The IRS explains that if you buy stocks or bonds, your basis is the purchase price plus any additional costs such as commissions[4]. Then subtract the basis from what you received when you sold.

Worked example

Buying 10 shares and selling them later

You buy 10 shares at $50 each and pay a $5 commission, so your basis is $505. Years later you sell all 10 at $80 a share for $800 (ignoring selling costs to keep it simple). The capital gain is $295, about 58.4% of your basis. Had you sold at $40 a share instead, you would have a capital loss of $105.

StepAmount
Cost basis (10 × $50 + $5 commission)$505.00
Sale proceeds (10 × $80)$800.00
Capital gain$295.00
If sold at $40 instead: capital loss−$105.00

Figures computed in code from the stated inputs; rounded to the nearest cent or tenth.

How are capital gains taxed in the U.S.?#

Holding time matters. Under IRS rules, an asset held for more than one year produces a long-term gain or loss, and one held for one year or less produces a short-term gain or loss[3]. Net short-term gains are taxed as ordinary income, while most long-term gains are taxed at 0%, 15% or 20% depending on taxable income; for 2025, the 0% rate applied to taxable income up to $48,350 for a single filer[3]. Some kinds of gain, such as on collectibles, can face higher maximum rates of 25% or 28%[3]. Thresholds change each year.

Losses help too: if your capital losses exceed your gains, the IRS lets you deduct up to $3,000 of the excess a year ($1,500 if married filing separately) and carry the rest forward[3]. Tax rules differ by country, and personal situations vary, so check your own tax authority or a qualified professional.

Read what a mutual fund is and what a stock is for how each works, and investment fees for the costs that reduce what you keep.

Sources

Numbers in brackets in the text point here. Grade A = primary source (regulator, statistics agency, law or official document).

  1. 1
    Capital Gain (glossary)U.S. SEC — Investor.gov (n.d.) · Grade A
  2. 2
    StocksU.S. SEC — Investor.gov (n.d.) · Grade A
  3. 3
    Topic no. 409, Capital gains and lossesInternal Revenue Service (IRS) (2025) · Grade A
  4. 4
    Topic no. 703, Basis of assetsInternal Revenue Service (IRS) (n.d.) · Grade A

How we checked this note

Every number, date and rule above links to its source. This note cites 4 sources, 4 of them primary (Grade A). Worked examples were calculated in code, and a second editor compared each figure with its source before publishing. Spotted an error? Tell us — corrections are listed on the note. Read our editorial policy.