When Do You Pay Capital Gains Tax on Stocks?

You pay capital gains tax on stocks when you sell shares for more than you paid for them, and only then. Rising share prices in your brokerage account do not create a tax bill on their own. Once you sell, how much you owe depends on how long you held the shares and how much other income you have, with federal rates running from 0% up to 37%.

Selling Is What Triggers the Tax

Share prices move every trading day, but paper gains and losses have no tax consequence. The IRS looks at your profit or loss only when you actually sell. Until that point, any increase in value is an unrealized gain: it shows up on your statement but not on your return. The taxable event is the sell order that locks in the difference between what you paid and what you received.

Your gain equals sale proceeds minus your cost basis, which is what you originally paid including commissions and fees. Sell for more than basis, you have a capital gain. Sell for less, you have a capital loss.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Swapping one stock for another counts too. The IRS treats the trade as a sale of the old shares and a purchase of the new ones.

Mutual Fund and ETF Distributions

Selling your own shares is not the only path to a capital gains tax bill. If you own a mutual fund, the fund buys and sells securities inside the portfolio all year. When it realizes profits, it distributes them to shareholders, and you owe tax on those distributions even in a year when you did not sell any of your fund shares. These distributions arrive on Form 1099-DIV and are treated as long-term capital gains no matter how long you have owned the fund.2Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 4

How Long You Held the Stock Sets the Rate

Federal law draws a bright line at one year. Stock held for one year or less produces a short-term gain. Stock held for more than a year produces a long-term gain.3Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses Your holding period starts the day after you buy and runs through the day you sell.

Short-Term Gains

Short-term gains get folded into your ordinary income and taxed at your regular graduated rate. For 2026, federal brackets for single filers run from 10% on the first $11,925 of taxable income up to 37% on income above $626,350.4Internal Revenue Service. Federal Income Tax Rates and Brackets A short-term stock gain simply pushes your total income higher and is taxed at whatever bracket it lands in.

Long-Term Gains

Long-term gains get preferential rates of 0%, 15%, or 20% depending on taxable income and filing status. Most taxpayers pay 15%. Lower-income filers may qualify for 0%, and the 20% rate applies only at higher income levels. The income thresholds for each rate adjust annually for inflation, so check the current year’s Schedule D instructions or the IRS capital gains page for the exact breakpoints.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

The gap between the two rate structures can be large. Selling a day before you cross the one-year mark can mean paying 37% instead of 15% or 20% on the same profit. Purchase dates matter.

The 3.8% Surtax on Higher Incomes

An additional 3.8% Net Investment Income Tax rides on top of the standard rates for higher earners. It applies to capital gains, dividends, interest, and similar investment income once your modified adjusted gross income crosses these thresholds:5Internal Revenue Service. Find Out if Net Investment Income Tax Applies to You

  • Single or head of household: $200,000
  • Married filing jointly: $250,000
  • Married filing separately: $125,000

These thresholds are set by statute and do not adjust for inflation. The tax hits the smaller of your net investment income or the amount by which your modified AGI exceeds the threshold. A married couple filing jointly with $300,000 in modified AGI and $80,000 in net investment income would owe NIIT on $50,000, adding $1,900 to their federal tax.5Internal Revenue Service. Find Out if Net Investment Income Tax Applies to You

Working Out the Gain

Your taxable gain is proceeds minus cost basis. Basis is what you paid, including commissions and transfer fees.6Internal Revenue Service. Publication 551, Basis of Assets Your broker reports both figures to you and to the IRS on Form 1099-B.7Internal Revenue Service. Instructions for Form 1099-B (2026)

When you have bought shares of the same stock at different prices over time, you need a method to decide which shares you are selling. The default is first-in, first-out, meaning the oldest shares are treated as sold first. You can also use specific identification, designating exactly which shares leave the account. Picking higher-cost lots can reduce your taxable gain.6Internal Revenue Service. Publication 551, Basis of Assets Stock splits and other corporate actions adjust your per-share basis, so keep those records.

Inherited stock generally gets a stepped-up basis equal to the fair market value on the date the previous owner died, not what they paid.6Internal Revenue Service. Publication 551, Basis of Assets Gifted stock is different: your basis is normally the donor’s original basis, so you take on any embedded gain when you sell.8Internal Revenue Service. Frequently Asked Questions on Gift Taxes

Losses Reduce What You Owe

Losses on stock sales offset gains dollar for dollar. Short-term losses first offset short-term gains, long-term losses first offset long-term gains, and anything left over crosses to the other category. If your total losses for the year exceed your total gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Any net loss beyond $3,000 carries forward indefinitely. Each future year, you apply the carryover the same way: first against gains, then up to $3,000 against ordinary income, until the loss is used up.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

Watch the Wash Sale Rule

Sell a stock at a loss and buy the same or a substantially identical security within 30 days on either side of that sale, and the IRS disallows the loss under the wash sale rule.9Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The 30-day window running each direction creates a 61-day blackout around the sale.

The disallowed loss is not lost. The IRS adds it to the cost basis of the replacement shares. If you sold at a $250 loss and bought replacements for $800, your basis in the replacements becomes $1,050.10Internal Revenue Service. Case Study 1 – Wash Sales You get the benefit of the loss when you eventually sell those replacement shares, provided you avoid another wash sale then.

When You Actually Pay

Stock sales are reported on Form 8949, with short-term transactions in Part I and long-term in Part II. The totals flow to Schedule D of your Form 1040, which sums up your capital gain or loss for the year.11Internal Revenue Service. About Schedule D (Form 1040), Capital Gains and Losses If every transaction on your 1099-B shows basis reported to the IRS and no adjustments are needed, you may be able to enter totals directly on Schedule D and skip Form 8949.12Internal Revenue Service. 2025 Instructions for Form 8949

The deadline for filing your 2025 return, including any stock sale activity, is April 15, 2026.13Internal Revenue Service. When to File An extension pushes the filing date to October 15 but does not push the payment date. Interest and penalties on unpaid balances accrue starting April 15.

Quarterly Estimated Payments

If a stock sale will leave you owing $1,000 or more in federal tax after withholding and credits, you generally need to make quarterly estimated payments using Form 1040-ES rather than wait until April. For the 2026 tax year, the due dates are:14Internal Revenue Service. Publication 509 (2026), Tax Calendars

  • April 15, 2026
  • June 15, 2026
  • September 15, 2026
  • January 15, 2027

Missing them can trigger an underpayment penalty. To stay clear of the penalty you generally need to pay at least 90% of the current year’s liability or 100% of last year’s, whichever is smaller. If your prior-year adjusted gross income was over $150,000 ($75,000 if married filing separately), the prior-year safe harbor rises to 110%.15Internal Revenue Service. Underpayment of Estimated Tax by Individuals Penalty

State Tax May Also Apply

Federal tax is not the whole picture. Most states also tax capital gains through their income tax, a few impose no income tax on investment gains at all, and the highest state rates exceed 13%. Some states give long-term gains preferential treatment while others tax them at the same rate as wages, so check your state tax agency for the rules that apply where you live.