How Is Capital Gains Tax Calculated?

💡 90K searches/mo💰 CPC: $10⏱️ 5 min read

Capital gains tax confuses people for one reason: the gain doesn't have its own tax bracket box you can look up. It gets stacked on top of your other income, split into long-term and short-term pieces, and possibly brushed with a 3.8% surtax. Run the stack in the right order and the math is surprisingly tidy. Here it is with real 2025 numbers.

Advertisement

What counts as a capital gain?

Sell a capital asset, a stock, a fund, crypto, a rental property, for more than its basis (usually what you paid plus fees), and the profit is a capital gain. Held more than one year? Long-term, and it earns the preferential rates. A year or less? Short-term, and it's taxed exactly like wages, at your ordinary bracket of 10% to 37%.

Losses matter too. Capital losses offset gains dollar for dollar first, and up to $3,000 of net loss per year also wipes out ordinary income, with the rest carrying forward. That's the machinery behind tax-loss harvesting.

The stacking order: where your gain actually sits

Three layers, filled in this order:

  1. Ordinary income fills the regular brackets. Salary, interest, freelance pay, everything except the gain.
  2. Short-term gains join it. They're ordinary income too, so they land in whatever bracket room is left.
  3. Long-term gains stack on top at their own breakpoints: 0%, then 15%, then 20%.

For 2025, the long-term breakpoints are:

Taxable income (single)Taxable income (married joint)Long-term rate
Up to $48,350Up to $96,7000%
$48,350 – $533,400$96,700 – $600,00015%
Over $533,400Over $600,00020%

The income in that table includes the gain itself. That's the stacking at work: your salary decides where the gain starts, and the gain's size decides where it ends.

Worked example 1: a simple 15% gain

A single filer with $75,000 of taxable income sells $25,000 of index fund shares held for three years. Stack: the $25,000 gain sits from $75,000 to $100,000 of income, entirely inside the 15% band. Federal tax: $25,000 × 15% = $3,750, a 15.0% effective rate, no NIIT (more on that below). She keeps $21,250 of the gain.

Worked example 2: a gain that spans two rates

Same filer, but a big year: $500,000 of income and a $100,000 long-term gain. The gain spans $500,000 to $600,000, which crosses the $533,400 breakpoint. The first $33,400 falls in the 15% band ($5,010) and the remaining $66,600 lands in the 20% band ($13,320). Total: $18,330, an 18.3% blended rate. Large gains routinely straddle a breakpoint, which is why single-rate mental math overestimates or underestimates the bill.

What will YOUR gain cost?

Enter income, long-term and short-term gains, and your state rate. Get the federal stack, NIIT, and effective rate.

Capital Gains Tax Calculator →

The 3.8% NIIT: the surtax people forget

Once modified adjusted gross income passes $200,000 single or $250,000 married filing jointly, the net investment income tax adds 3.8% on the smaller of your net investment income or the excess over the threshold. Example: $210,000 of income plus an $80,000 long-term gain. The 15% share is $12,000, MAGI is $290,000, the excess is $90,000, and the gain ($80,000) is smaller, so the NIIT applies to the whole gain: $3,040. Total $15,040, an 18.8% effective rate that surprises first-timers.

Notably, the NIIT can hit you even when your gain is entirely in the 15% band, and it operates on MAGI, not taxable income, so it starts a bit earlier than the brackets suggest.

How crypto changes the picture

Crypto uses the same two-tier system with three twists that trip people up.

The holding-period incentive is dramatic. An investor with $82,000 of income who took a $36,000 crypto profit owes $8,213 selling at 11 months but $5,400 at 13 months. Waiting two months across the one-year line saved $2,813.

Four legal ways to shrink the bill

Advertisement

Frequently Asked Questions

Is capital gains tax calculated on top of my salary?

Yes, literally stacked on top. Your ordinary income fills the regular 10% to 37% brackets first, short-term gains join it there, and long-term gains then stack above at their own 0%, 15%, or 20% breakpoints. That's why the same $25,000 gain can be taxed at 0%, 15%, or 20% depending on what else you earned.

Do I pay capital gains tax if I reinvest?

In a regular brokerage account, yes. Selling stock and rebuying it, or swapping one crypto token for another, realizes the gain immediately; reinvesting doesn't defer it. Only tax-advantaged accounts like 401(k)s, IRAs, and Roths shelter trading gains, which is a strong argument for keeping your most active trading inside them.

How does the holding period work for crypto?

The clock starts when you acquire the token and the long-term rate applies when you sell more than 365 days later. A $36,000 gain on $82,000 of income costs $8,213 if sold as a short-term gain but $5,400 if held past one year, a $2,813 difference. The 1099-DA reporting that started with tax year 2025 makes the dates matter even more.

This guide uses 2025 federal brackets for planning, not tax advice. State taxes, the 25% unrecaptured section 1250 rate for rentals, the 28% collectibles rate, and carryforwards all change the numbers; a CPA earns their fee on exactly those edge cases.

Related Tools