You sold an investment, a piece of property, maybe some crypto, and you're looking at a cool $300,000 profit. The first question that hits you, before you even think about the new car or the kitchen remodel, is this: how much of this is the IRS going to take?

The short answer is: it depends. It depends wildly. I've seen clients in similar situations pay anywhere from $45,000 to over $120,000 in combined federal and state taxes on that same $300,000 gain. The difference isn't magic; it's a cocktail of your income, how long you held the asset, and where you live.

This guide will walk you through exactly how to figure out your number. We'll use that $300,000 as our working example throughout.

How Are Capital Gains Taxed?

Forget a single tax rate. The system hinges on two main variables: your holding period and your taxable income.

The Holding Period: Short-Term vs. Long-Term

This is the biggest divider. Hold an asset for one year or less? That's a short-term capital gain. It gets added to your ordinary income (like wages) and taxed at your regular income tax rates. These rates go up to 37% federally.

Hold it for more than one year? Congratulations, you have a long-term capital gain. These benefit from significantly lower tax rates. This is why everyone harps on "holding for the long term."

Long-Term Capital Gains Tax Brackets (2024)

These rates are tied to your taxable income. It's crucial to note this is your total income, not just the gain itself. The gain gets stacked on top.

Filing Status 0% Rate 15% Rate 20% Rate
Single Up to $47,025 $47,026 - $518,900 Over $518,900
Married Filing Jointly Up to $94,050 $94,051 - $583,750 Over $583,750
Head of Household Up to $63,000 $63,001 - $551,350 Over $551,350

Source: Internal Revenue Service

So, if you're a single filer with a total taxable income of $60,000 and you add a $300,000 long-term gain, your total becomes $360,000. That puts you solidly in the 15% bracket for the gain.

A critical nuance most people miss: The 3.8% Net Investment Income Tax (NIIT). This is an extra surtax that kicks in if your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly). It applies to the lesser of your net investment income (which includes capital gains) or the amount your MAGI exceeds the threshold. On a $300,000 gain, this often adds a significant chunk.

How to Calculate Your Capital Gains Tax on $300,000

Let's put this into practice with two concrete scenarios. We'll assume a single filer living in California (for state tax purposes later).

Scenario 1: The Short-Term Gain

You bought and sold a volatile stock within 10 months, netting $300,000. Your other taxable income (salary, etc.) is $100,000.

Federal Tax Calculation:
Total Taxable Income = $100,000 (salary) + $300,000 (short-term gain) = $400,000.
Short-term gains are taxed as ordinary income. Using 2024 tax brackets, the federal income tax on $400,000 for a single filer is approximately $112,000 (this includes the progressive rates up to 35%/37%).

Net Investment Income Tax (NIIT):
MAGI is $400,000, which is $200,000 over the $200,000 threshold. The NIIT is 3.8% of the lesser of your net investment income ($300,000) or the excess MAGI ($200,000). So, 3.8% x $200,000 = $7,600.

Federal Total: ~$112,000 + $7,600 = $119,600.

That's nearly 40% of your profit gone to the federal government alone, before state tax.

Scenario 2: The Long-Term Gain

You sold a rental property you owned for 5 years, with a $300,000 profit. Your other taxable income is $100,000.

Federal Tax Calculation:
Total Taxable Income = $100,000 + $300,000 = $400,000.
Now, we need to layer the gain on top of your income. The first chunk of the gain fills up the lower brackets.

  • Your $100,000 salary already uses up the 0% LTCG space ($0-$47,025).
  • The next $252,975 of your gain ($300,000 - $47,025) falls into the 15% bracket (from $47,026 to $400,000 total).
  • The remaining $47,025 of your gain? It actually pushes your total income over $400,000, but wait—the 20% bracket for a single filer starts at $518,900. So, all $300,000 of this gain is actually taxed at 0% and 15% only. No 20% rate here.

So, Federal LTCG Tax = 15% x $300,000 = $45,000.

Net Investment Income Tax (NIIT):
Same calculation as before: 3.8% x $200,000 = $7,600.

Federal Total: $45,000 + $7,600 = $52,600.

Just by holding the asset over a year, your federal tax bill dropped from ~$119,600 to $52,600. That's a savings of $67,000.

The State Tax Impact: Don't Get Blindsided

Many online calculators stop at federal tax. That's a huge mistake. State taxes can be a second major bite. Let's add California to our long-term scenario.

California does not have a preferential rate for long-term gains. All capital gains are taxed as ordinary income. The top marginal rate in California is 12.3%, and it kicks in pretty quickly.

On a $400,000 total income, a single filer's California state tax would be roughly $35,000 (this is a simplified estimate; California has a progressive bracket system).

Combined Tax Bill (Long-Term, CA Resident):
Federal: $52,600
State (CA): ~$35,000
Total: ~$87,600

Now you see the real range. A short-term gain for a high-earner in California could approach $160,000+ in total taxes. A long-term gain for someone with moderate other income in a no-income-tax state like Florida or Texas might be closer to the $45,000 federal base.

How to Legally Reduce Your Capital Gains Tax Bill

You're not powerless. Planning is everything.

Hold for over a year. This is the single most powerful move, as our math clearly shows.

Harvest losses. Sold another investment at a loss this year? You can use those losses to offset your gains. You can net losses against gains dollar-for-dollar. If you have a $300,000 gain and a $50,000 loss, you only pay tax on $250,000.

Manage your income. If you're near a bracket threshold, see if you can defer income (like a bonus) to the next year to stay in the 0% or 15% LTCG bracket. This requires careful projection.

Consider charitable giving. Donating appreciated stock you've held long-term to a qualified charity lets you deduct the full market value and avoid paying capital gains tax on the appreciation. It's a double benefit.

Use tax-advantaged accounts. Gains inside a Roth IRA or Roth 401(k) are tax-free upon qualified withdrawal. This is the ultimate shelter.

Common Capital Gains Tax Mistakes

I've prepared hundreds of returns. Here's where people get tripped up.

Ignoring the NIIT. People in the 15% bracket think they're safe at 15%. Then the 3.8% NIIT hits them, making their effective rate 18.8%. It's a nasty surprise.

Forgetting about state tax. As we calculated, it can be a third or more of your total liability.

Miscalculating cost basis. Your gain is Sale Price MINUS Cost Basis. Basis isn't just what you paid. It includes closing costs on real estate, major improvements (a new roof, an addition), and reinvested dividends for stocks. An inaccurate basis means overpaying tax.

Not planning for the Medicare surtax. The NIIT directly funds Medicare. A large, unplanned gain can trigger this tax and also potentially increase your Medicare Part B and D premiums due to Income-Related Monthly Adjustment Amounts (IRMAA).

Frequently Asked Questions on Capital Gains Tax

What if my $300,000 gain pushes my total income over the threshold for the 20% bracket or the NIIT?
That's exactly what happens in most scenarios with a gain this size. The gain itself is what causes you to cross the threshold. You don't pay the higher rate on all of it, only the portion that sits in the higher bracket. For the NIIT, you pay 3.8% on the lesser of your investment income or the amount you're over the threshold. In our long-term example, even though the gain was $300k, the NIIT only applied to $200k of it because that's how much the income exceeded the $200k limit.
How much does state tax typically add for a $300,000 capital gain?
It's a massive variable. It could be zero in states like Florida, Texas, Nevada, or Wyoming. It could be 5% or more in many states. In high-tax states like California, New York, or New Jersey, it can easily add $30,000 to $45,000 to your bill on a $300,000 gain, as they tax gains at ordinary income rates. Always run your state's numbers separately.
I inherited the asset. Is my $300,000 gain calculated differently?
Yes, and this is a major benefit. When you inherit property, you generally get a "step-up in basis" to its fair market value at the date of the original owner's death. If you sell it immediately, your gain might be minimal or zero. Your $300,000 "profit" might largely be erased for tax purposes. This is one of the most powerful aspects of estate planning.
Can I spread the tax over several years using an installment sale?
For certain assets, especially real estate or a business, yes. An installment sale allows you to receive payments over time and report the gain proportionally each year as you receive the money. This can help keep you in a lower tax bracket each year and manage the NIIT. The rules are specific (you can't do this with publicly traded stock), and you must file Form 6252.
How does selling a primary home affect the tax on a $300,000 profit?
This is a huge exclusion many forget. If you owned and lived in the home as your main residence for at least 2 of the last 5 years, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly). In a best-case scenario, a married couple with a $300,000 profit on their home sale might pay $0 in federal capital gains tax. Any profit above the exclusion amount is taxed as a long-term gain.

Figuring out your exact tax on a $300,000 capital gain requires pulling together your specific numbers: your other income, your filing status, the asset's holding period, and your state of residence. Use the scenarios here as a framework, but consider consulting a tax professional for a precise calculation, especially if the asset involved is complex like real estate or a business interest. The key takeaway? Planning ahead—especially holding for the long term—is worth tens of thousands of dollars.