Emarsys Finance logo Emarsys FinanceEveryday finance, explained plainly
Taxes Simplified

Capital Gains Tax on Stocks and How the Rates Work

You sold some shares at a profit, and now you are staring at a 1099-B wondering how much of that gain the IRS will take.

A brokerage tax form, a calculator and a printed stock chart spread across a wooden desk next to a cup of coffee

You sold some shares at a profit, and now you are staring at a 1099-B wondering how much of that gain the IRS will take. The answer could be zero, 15 percent, or as much as 37 percent, and the difference often comes down to a few days on the calendar. Capital gains tax on stocks follows a short list of rules, and once you understand them you can plan sales instead of being surprised in April.

I write about investing and retirement accounts, and this is the topic readers ask me about most after their first real sale. Here is how the rates work for the 2026 tax year, what changes the bill, and where people overpay.

How capital gains tax on stocks is calculated

Your gain is the sale price minus your cost basis. Cost basis is what you paid for the shares, including any commission, plus reinvested dividends if you had automatic reinvestment turned on. That last part matters. If you reinvested $1,200 of dividends over five years and forget to add it to your basis, you pay tax on that $1,200 twice.

Your broker reports the basis on Form 1099-B for shares bought after 2011. For older shares or shares moved between brokers, check the number. A missing basis shows up as zero, which makes the whole sale look like profit.

Then the holding period decides which rate applies.

  • Short term: held one year or less. Taxed as ordinary income at your regular bracket, from 10 to 37 percent.
  • Long term: held more than one year. Taxed at 0, 15, or 20 percent depending on your taxable income.

"More than one year" means the day after the one year anniversary. Buy on March 10, 2025, and a sale on March 10, 2026 is still short term. March 11 is long term.

The 2026 long term capital gains brackets

Long term rates stack on top of your other taxable income. Your salary fills the lower brackets first, and the gain sits on top.

RateSingle filers, taxable incomeMarried filing jointly, taxable income
0%Up to $49,450Up to $98,900
15%$49,451 to $545,500$98,901 to $613,700
20%Over $545,500Over $613,700

High earners can also owe the 3.8 percent net investment income tax once modified adjusted gross income passes $200,000 for single filers or $250,000 for joint filers. Those thresholds are not indexed to inflation, so more households cross them every year.

Here is a worked example. A single filer has $40,000 of taxable income from wages and sells stock held for three years with a $15,000 gain. The first $9,450 of the gain fills the rest of the 0 percent bracket and is tax free. The remaining $5,550 is taxed at 15 percent, which is $832.50. The total federal tax on a $15,000 gain is under $850. Sell the same shares after 11 months and the whole $15,000 would be taxed at the 12 and 22 percent brackets instead, roughly $2,260, close to three times as much.

Ways to legally lower the bill

Wait for the long term mark

If a position is close to its one year anniversary and you are not worried about a sharp drop, waiting a few weeks can cut the tax rate by half or more.

Offset gains with losses

Realized losses cancel gains dollar for dollar. If losses exceed gains, up to $3,000 a year comes off your ordinary income and the rest carries forward. Our guide to tax-loss harvesting before December 31 without a wash sale walks through the 30 day rule that trips people up.

Pick which lots you sell

If you bought the same stock at different prices, most brokers default to first in, first out. You can usually choose specific lots instead and sell the shares with the highest basis, which shrinks the gain. Set this before you place the trade, not after.

Give shares instead of cash

If you already donate to charity, giving appreciated shares held more than a year is usually better than selling them and giving the cash. You can generally deduct the full market value if you itemize, and neither you nor the charity pays tax on the gain. A $5,000 gift of stock you bought for $2,000 avoids tax on $3,000 of gain, worth $450 at the 15 percent rate.

Use a low income year

Retirees between their last paycheck and Social Security, or anyone on a sabbatical, may fit large gains inside the 0 percent bracket. Some people deliberately sell and immediately rebuy to reset their basis higher, a move sometimes called gain harvesting. The wash sale rule only applies to losses, so this is allowed.

Why "never sell a winner" is weak tax advice

A common line is that you should hold winning stocks forever so you never pay capital gains tax. There is some truth in it, since basis steps up at death. But I think it causes more harm than good for most investors.

Holding a stock only to avoid tax means letting one position grow to 30 or 40 percent of a portfolio. If that company drops by half, you lose far more than the 15 percent tax you dodged. Paying $1,500 in tax to cut a $10,000 gain out of an oversized position is often the cheaper risk. The tax is a cost to manage, not a reason to stay concentrated.

Reporting the sale and paying on time

Each sale goes on Form 8949, and the totals carry to Schedule D of your Form 1040. Most tax software imports the 1099-B directly. Check two things before you file: that the basis matches your own records, and that each lot is marked short or long term correctly.

If you realize a large gain early in the year, you may owe estimated tax rather than waiting until April. The rules in our article on quarterly estimated taxes on side income apply to investment gains too. Married couples should also look at how filing status changes the brackets; our breakdown of married filing jointly or separately shows when it matters.

States add their own layer. Most tax capital gains as ordinary income, a handful charge no income tax at all, and a few have special rules. Check your state before you assume the federal number is the whole bill.

Frequently asked questions

How much tax do I pay when I sell stock?

It depends on how long you held it and your taxable income. Shares held one year or less are taxed at your ordinary rate, up to 37 percent. Shares held longer are taxed at 0, 15, or 20 percent, plus possibly 3.8 percent for high earners.

Do I pay capital gains tax if I reinvest the money?

Yes. Selling a stock in a regular brokerage account triggers the tax even if you buy something else the same day. Only sales inside tax advantaged accounts like an IRA or 401(k) avoid immediate tax.

Can I avoid capital gains tax on stocks completely?

You can owe nothing if your long term gain fits inside the 0 percent bracket, or if losses fully offset it. Donating appreciated shares to charity and holding until death also avoid the tax. Otherwise, the goal is usually to lower and time it, not to escape it.

SW
Sable Whitmore

Sable opened her first index fund account at twenty four and has tracked every contribution and return since. She writes about investing and retirement from her own numbers, not a hypothetical example.

More posts by Sable

More in Taxes Simplified

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto ankertoto