What counts as a taxable sale

Tax is triggered by a sale or exchange in an ordinary, taxable account. Common examples:

  • Selling shares or fund units in a regular brokerage account.
  • Selling investment property, such as a rental home or land.
  • Selling or exchanging digital assets such as cryptocurrency.
  • Receiving a capital gain payout from a fund you own, even if the payout is reinvested automatically.

Some events are not taxable sales. Holding an investment that has grown is not one. Buying and selling inside a retirement account, such as an IRA or a 401(k), does not create capital gains tax at the time of the trade; those accounts have their own rules for when money is taxed. The sale of your main home has a separate exclusion that can remove some or all of the gain from tax.

Step 1: understand your gain

Your gain is the profit on the sale: what you received, less what the asset cost you. Cost basis is the tax term for what the asset cost you. It includes the purchase price plus buying costs such as commissions, so higher buying costs mean a smaller gain. Selling costs reduce what you received, so they also shrink the gain.

Gain or loss

If what you received is less than your cost basis, you have a capital loss, not a gain, and no tax is due on that sale.

Step 2: check how long you held it

If you held the asset for more than one year, the gain is long-term and is taxed at 0%, 15% or 20%. If you held it for one year or less, the gain is short-term and is taxed at the same rates as your wages. Which long-term rate applies depends on your taxable income, which is your income after deductions.

Step 3: a full worked example

This example uses tax year 2025 figures throughout, because 2025 is the latest year for which the long-term thresholds could be verified. Assume a single filer who earns a $70,000 salary and takes the standard deduction. The figures below are the results.

  1. Purchase: 100 shares at $80 each in 2023, plus a $10 commission. Cost basis: $8,010.
  2. Sale: 100 shares at $150 each in 2025, less a $10 commission. Amount received: $14,990.
  3. Gain: $6,980. The shares were held for more than one year, so the gain is long-term.
  4. Taxable income before the gain, after the $15,750 standard deduction for 2025: $54,250.
  5. Rate: the gain sits on top of that income. For a single filer in 2025 the 15% rate covers taxable income from $48,351 to $533,400, so the whole gain is taxed at 15%.
  6. Tax: $1,047.
  7. After-tax profit: $5,933. Cash in hand from the sale after tax: $13,943.
Profit and proceeds are different numbers

The $13,943 is the cash that comes back to you, and it includes the $8,010 you put in at the start. Your profit after tax is $5,933. Keep the two apart when you plan what the sale will pay for.

How the result changes with the sale price

The table keeps the same purchase and the same 15% rate, and changes only the price the shares are sold at.

100 shares with a cost basis of $8,010, a $10 selling commission, and a long-term gain taxed entirely at 15%. Federal income tax only.

Sale price per shareAmount receivedGain or lossFederal tax at 15%Profit or loss after tax
$60$5,990-$2,020$0-$2,020
$80$7,990-$20$0-$20
$100$9,990$1,980$297$1,683
$150$14,990$6,980$1,047$5,933
$200$19,990$11,980$1,797$10,183

Two rows are worth a second look. Selling at the same $80 you paid still produces a small loss of $20, because the two commissions count. And a loss is not simply ignored. It can be set against gains from other sales, and if your losses for the year are larger than your gains, up to $3,000 of the excess can be deducted from other income such as wages.

How the sale is reported

You do not pay the tax at the moment of sale. The gain goes on your federal tax return for the year in which you sold.

  • Form 1099-B: your broker sends this after the year ends. It lists each sale, the amount received and, in most cases, the cost basis.
  • Form 8949: where each sale is listed on your return.
  • Schedule D: where the totals from Form 8949 are added up and carried to your Form 1040.

Check the cost basis on Form 1099-B against your own records. It can be missing or wrong for shares bought long ago or moved from another broker, and an understated basis means paying tax on a gain you did not make.

Estimate the tax on a sale

Enter what you paid, what you sold for, your taxable income, filing status and holding period.

Open Capital Gains Tax Calculator →
Getting a sensible answer from the calculator

Add buying costs to the purchase price and subtract selling costs from the sale price, because there are no separate fields for them. Enter taxable income, not your salary. The calculator shows a loss as a $0 gain and covers federal tax only, so state tax is on top.