# Calculating long-term capital gains tax

**URL:** <https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092>\
**Category:** Factual Questions\
**Created:** [May 7, 2022, 1:53am UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092 "2022-05-07T01:53:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [May 7, 2022, 1:53am UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/1 "2022-05-07T01:53:15Z")

</div>

Been trying to figure out long term capital gains tax. Multiple sources point to a rate of 0%, 15%, or 20% depending on your taxable income:

> **[Capital gains tax in the United States | Current law](https://en.wikipedia.org/wiki/Capital_gains_tax_in_the_United_States#Current_law)**
>
> The United States taxes short-term capital gains at the same rate as it taxes ordinary income. 
> Long-term capital gains are taxed at lower rates shown in the table below. (Qualified dividends receive the same preference.)

Seems simple. But suppose we’re married and filing jointly, and our taxable income is $83,351. Surely that doesn’t mean all of our LTCG are taxed at 15%, whereas if our taxable income had been $83,350, all of our LTCG would have been taxed at 0%. So maybe it’s a marginal-tax-rate scheme, like ordinary income tax?

I tried using the calculator on this website to see if I could make sense of how it all works:

> **[2022-2023 Capital Gains Tax Rates & Calculator - NerdWallet](https://www.nerdwallet.com/article/taxes/capital-gains-tax-rates)**
>
> Long-term capital gains tax and short-term capital gains tax, capital gains tax triggers, how each is calculated & how to cut your tax bill.

I tinkered with different values of LTCG (sale price minus purchase price) and taxable income, and I can see that yes, the net LTCG tax rate doesn’t experience step-changes from 0-15-20% as you gradually adjust LTCG and/or ordinary income (they even show in the calculator section that portions of your LTCG are taxed at different rates. But I just can’t figure out the relationships. I’d like very much to build my own calculator in Excel to help get it sorted out in my head. Can someone explain in words how this works, or point me toward a source that does?

---

<div class="post-metadata">

**Author:** ![Munch](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/munch/32/5281_2.png) [@Munch](https://boards.straightdope.com/u/Munch)\
**Post date:** [May 7, 2022, 2:19am UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/2 "2022-05-07T02:19:30Z")

</div>

> [@Machine\_Elf](#):
>
> Can someone explain in words how this works, or point me toward a source that does?

It’s in the chart you linked to. Your LTCG rate is dependent on your ordinary income level. Ordinary income does not include ANY capital gains, so it’s not going to step up with your gains.

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [May 7, 2022, 2:56pm UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/3 "2022-05-07T14:56:49Z")

</div>

> [@Munch](#):
>
> It’s in the chart you linked to. Your LTCG rate is dependent on your ordinary income level.

This is so simplified that it doesn’t clarify anything for me, and now that I’ve tinkered with the NerdWallet calculator some more, I’m not even sure it’s correct.

Using the NerdWallet calculator for married-filing-jointly:

- if I enter a LTCG of $20,000 and a 2021 taxable income (excluding LTCG) of $60,800, then the entire $20K of CG gets taxed at 0%.

- if I enter a LTCG of $20,000 and a 2021 taxable income (excluding LTCG) of $70,800, then $10K of LTCG gets taxed at 0%, and the remaining $10K gets taxed at 15%.

- if I enter a LTCG of $20,000 and a 2021 taxable income (excluding LTCG) of $80,800, then the entire $20K of CG gets taxed at 15%.

---

<div class="post-metadata">

**Author:** ![yearofglad](https://avatars.discourse-cdn.com/v4/letter/y/b782af/32.png) [@yearofglad](https://boards.straightdope.com/u/yearofglad)\
**Post date:** [May 7, 2022, 3:41pm UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/4 "2022-05-07T15:41:54Z")

</div>

I am not an accountant.

Nerdwallet is correct. Your capital gains tax rate “steps up” as your capital gains are added to your income. However, capital gains will NOT cause your ordinary income to be taxed at a higher rate. Your ordinary income rate is calculated first, and then capital gains are “added on” to determine the tax rate on those gains. [This article was helpful.](https://erwealth.com/podcastblog/will-capital-gains-push-me-into-a-higher-tax-bracket)

Add your long-term capital gains “on top of” your income, and then assess the tax rates. So, in your second example, when you add the $20,000 onto your income of $70,800, the first $10,000 in capital gains tax is at 0%, since 70,800 + 10,000 = 80,800, which is the top of the range for married filing jointly capital gains of 0%. The other $10,000 of your capital gains lies in the next range, at 15%.

Here’s another example, LTCG, married-filing-jointly:

2021 taxable income of $70,000, LTCG of $450,000.

The first $10,800 of the capital gains is taxed at 0%, and puts your “total income” at $80,800.  
The next $420,800 of the capital gains is taxed at 15%, and puts your total income at $501,600.  
The remaining $18,400 of the capital gains is taxed at 20%, since it puts your total income in the $501,601+ bracket.

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [May 8, 2022, 1:38am UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/5 "2022-05-08T01:38:17Z")

</div>

> [@yearofglad](#):
>
> Add your long-term capital gains “on top of” your income, and then assess the tax rates. So, in your second example, when you add the $20,000 onto your income of $70,800, the first $10,000 in capital gains tax is at 0%, since 70,800 + 10,000 = 80,800, which is the top of the range for married filing jointly capital gains of 0%. The other $10,000 of your capital gains lies in the next range, at 15%.

Thanks, this makes sense. Between this and more tinkering with the NerdWallet calculator, I got a good enough grasp of it to write my own calculator in Excel, and its results match what I get with NerdWallet, so I think I’m good to go.

---

<div class="post-metadata">

**Author:** ![Yelnick\_McWawa](https://avatars.discourse-cdn.com/v4/letter/y/839c29/32.png) [@Yelnick\_McWawa](https://boards.straightdope.com/u/Yelnick_McWawa)\
**Post date:** [May 8, 2022, 12:48pm UTC](https://boards.straightdope.com/t/calculating-long-term-capital-gains-tax/964092/6 "2022-05-08T12:48:19Z")

</div>

See the instructions for form 1040, specifically, “Qualified Dividends and Capital Gain Tax Worksheet” (page 36 for 2021 tax returns)
