Offsetting capital gains

lawman

Thinks s/he gets paid by the post
Joined
Jul 26, 2008
Messages
1,213
Location
Weatherford, Texas
If I take a $20,000.00 distribution from my IRA can I use that to offset $20,000 of losses in my brokerage account? Or I guess a better way of asking might be can I use losses in my brokerage account to offset distributions from my IRA?
 
No.

Capital losses can offset capital gains to an unlimited degree, but excess capital losses can only offset $3K of ordinary income per year.

So in the situation you describe, you'd be left with $17K of ordinary income from the IRA distribution, and a $17K capital loss carry forward that you would use either to (a) offset capital gains in future years or (b) at $3K per year against ordinary income.

See IRS Schedule D line 21 at https://www.irs.gov/pub/irs-pdf/f1040sd.pdf.
 
No.

Capital losses can offset capital gains to an unlimited degree, but excess capital losses can only offset $3K of ordinary income per year.

So in the situation you describe, you'd be left with $17K of ordinary income from the IRA distribution, and a $17K capital loss carry forward that you would use either to (a) offset capital gains in future years or (b) at $3K per year against ordinary income.

See IRS Schedule D line 21 at https://www.irs.gov/pub/irs-pdf/f1040sd.pdf.

Great.. I'll have to live to be 100 before my losses are used up...Does it matter whether they are long term or short term?

So if I have a $40,000.00 carry over loss from 2022 and I sell a security that has a $40.000.00 gain in 2023 is the effect on my income zero?
 
Last edited:
Great.. I'll have to live to be 100 before my losses are used up...Does it matter whether they are long term or short term?

So if I have a $40,000.00 carry over loss from 2022 and I sell a security that has a $40.000.00 gain in 2023 is the effect on my income zero?

Yes from a federal income tax perspective. My state does not allow capital loss carry over.
 
Maybe. Capital losses are used to offset capital gains, but once those are covered, if you still have losses, you can apply $3000 to offset current income. If you still have losses after that, they will carry forward.
 
Great.. I'll have to live to be 100 before my losses are used up...Does it matter whether they are long term or short term?

For certain things, yes, it matters if losses are long tem or short term. But in the example you're talking about, no, it doesn't.

By the way, your carry forward expires when you do.

So if I have a $40,000.00 carry over loss from 2022 and I sell a security that has a $40.000.00 gain in 2023 is the effect on my income zero?

Well, you could realize the $40K gain, the carry forward loss would offset it, and you'd have zero federal taxable income.

Had you not realized the gain in 2023, you could probably use $3K of the $40K carry forward loss to reduce ordinary income, which probably would have resulted in a somewhat lower tax bill.
 
So assuming I had a $40,000.00 loss in 2021 and I sold $40,000.00 worth of a stock index mutual fund in 2022 that had a gain is it safe to assume that only part of that loss would be offset because part of the shares sold would be my basis?
 
So assuming I had a $40,000.00 loss in 2021 and I sold $40,000.00 worth of a stock index mutual fund in 2022 that had a gain is it safe to assume that only part of that loss would be offset because part of the shares sold would be my basis?

You are taxed only on your GAIN. Any carry over losses can be applied.
 
So assuming I had a $40,000.00 loss in 2021 and I sold $40,000.00 worth of a stock index mutual fund in 2022 that had a gain is it safe to assume that only part of that loss would be offset because part of the shares sold would be my basis?

Assuming you know your basis and it was non-zero - which are two things that are usually true - yes.

Although if your basis was anything less than $3,000, then the excess loss would go against ordinary income as already mentioned.

And if your basis was more than $3,000, after taking $3K against ordinary income, your excess loss would still be carried forward to 2023.
 
Correct me if I am wrong but no one has mentioned the Wash Sale Rule which I would guess the OP doesn't know how that plays into this.

If you sold the stock index mutual fund but had bought sales directly or via reinvestment of dividends or capital gains 30 days prior to and 30 days after the sale that created the $40k cap gain then you can not use the 2021 capital loss to offset the gain because you just violated the Wash Sale Rule. Additionally, if you held that same stock index mutual fund in any other account in any brokerage and IIRC even your spouse holds it and had purchased shares in that 61 day time frame you have once again violated the Wash Sale Rule.

To the OP, this is pretty complex stuff, I thought I understood the Wash Sale Rule until I asked questions here and did some reading.
 
Correct me if I am wrong but no one has mentioned the Wash Sale Rule which I would guess the OP doesn't know how that plays into this.

If you sold the stock index mutual fund but had bought sales directly or via reinvestment of dividends or capital gains 30 days prior to and 30 days after the sale that created the $40k cap gain then you can not use the 2021 capital loss to offset the gain because you just violated the Wash Sale Rule. Additionally, if you held that same stock index mutual fund in any other account in any brokerage and IIRC even your spouse holds it and had purchased shares in that 61 day time frame you have once again violated the Wash Sale Rule.

To the OP, this is pretty complex stuff, I thought I understood the Wash Sale Rule until I asked questions here and did some reading.

Yes, the wash sale rule is something to be aware of.

But the wash sale rule only applies when shares are sold at a loss and other substantially identical shares are purchased in the 61 day window surrounding the sale date of the shares with the loss.

None of the examples in this thread - including yours - are likely to meet those criteria.

Also, in the cases where wash sales occur, any capital loss is added to the basis of the replacement shares, which means the capital loss just gets deferred until the replacement shares are sold later.
 
Last edited:
The wash sale rule is pretty simple, just don’t sell at a loss and then rebuy the same investment within the wash sale time window. The biggest gotcha is when folks forget about a reinvested dividend.
 
The wash sale rule is pretty simple, just don’t sell at a loss and then rebuy the same investment within the wash sale time window. The biggest gotcha is when folks forget about a reinvested dividend.

Shouldn't wash sales not be an issue if you use FIFO when selling shares? Fidelity gave me fits with their 1099 reporting a few years ago with regard to a wash sale I don't think really happened.

I sold a bunch of shares back in September of 2018, about 2 weeks before and after an automatic dividend reinvestment. One purchase was at a slightly higher NAV, the other lower. Fidelity made no mention of any wash sale. I use FIFO for cost basis, so the shares I actually "sold" were those I bought in 2006 and 2007. I made about $40 on the sale.

Fast forward to January of 2020. I sell some more shares. Using FIFO again, I am selling shares from 2007 and 2008 and made about $1,500 on the sale. But Fidelity, for some reason, has flagged those 2 dividend reinvestments surrounding the September, 2018 sale as wash sales. They, for some reason, included them in the cost basis of the January of 2020 sale. The disallowed wash sale loss comes to 17 cents. It has no real affect on my taxes, of course, but it has turned my spreadsheet into a small mess because there is a 10-year gap between the shares I actually sold in 2020.

I asked Fidelity why they did this, after taking a while to actually determine that they had done this (there was an error on one of the dates in their 1099 form I had to get passed). That's when they told me about wash sales even though I told them I used FIFO. And there was nothing flagged on the 2018 sale.

I still don't know how a wash sale developed from either sale.
 
Shouldn't wash sales not be an issue if you use FIFO when selling shares?
It's not a given that the first shares you bought wouldn't be sold at a loss later.

For typical holdings like yours that have mostly gone up over time you probably won't be selling at a loss but I wouldn't generalize that using FIFO prevents wash sales.
 
Shouldn't wash sales not be an issue if you use FIFO when selling shares? Fidelity gave me fits with their 1099 reporting a few years ago with regard to a wash sale I don't think really happened.

I sold a bunch of shares back in September of 2018, about 2 weeks before and after an automatic dividend reinvestment. One purchase was at a slightly higher NAV, the other lower. Fidelity made no mention of any wash sale. I use FIFO for cost basis, so the shares I actually "sold" were those I bought in 2006 and 2007. I made about $40 on the sale.

Fast forward to January of 2020. I sell some more shares. Using FIFO again, I am selling shares from 2007 and 2008 and made about $1,500 on the sale. But Fidelity, for some reason, has flagged those 2 dividend reinvestments surrounding the September, 2018 sale as wash sales. They, for some reason, included them in the cost basis of the January of 2020 sale. The disallowed wash sale loss comes to 17 cents. It has no real affect on my taxes, of course, but it has turned my spreadsheet into a small mess because there is a 10-year gap between the shares I actually sold in 2020.

I asked Fidelity why they did this, after taking a while to actually determine that they had done this (there was an error on one of the dates in their 1099 form I had to get passed). That's when they told me about wash sales even though I told them I used FIFO. And there was nothing flagged on the 2018 sale.

I still don't know how a wash sale developed from either sale.

When I tax loss harvest, I stop dividend reinvestment for a period of time and then I sell by specific lot to maximize the benefit.
 
Before making a substantial donation earlier this year, I was told by my tax man that I could use it not only against capital gains but also against my AGI this year. I have lost the relevant tax code citation and would appreciate any input from any of you who have used this. Thanks so much .
 
When I tax loss harvest, I stop dividend reinvestment for a period of time and then I sell by specific lot to maximize the benefit.
I permanently stopped automatic reinvestment on the various funds in my taxable account.
So that makes it easier to TLH.
I typically add additional money to my taxable settlement fund each month and invest that where it makes sense (not a fund I recently TLH'd from)...
 
Before making a substantial donation earlier this year, I was told by my tax man that I could use it not only against capital gains but also against my AGI this year. I have lost the relevant tax code citation and would appreciate any input from any of you who have used this. Thanks so much .

Depends on what you're talking about.

If you donated shares of a security which had an unrealized long term capital gain, then those shares could be sold by the charity with a stepped up basis to the FMV on the date of donation, and you'd be entitled to a charitable deduction on your Schedule A if you itemized.

You can also donate securities to a DAF and get a charitable deduction for the FMV of those shares in the year of the transfer to the DAF even if you don't make the donation to the charity from the DAF until later. (I'm not sure if securities have to be long term or not in this case.)

More broadly, most donations to charities are deductible on Schedule A if you itemize and are not really connected to capital gains or losses at all. There are some AGI limitations in some cases, but that's a pretty loose connection.

The last year or two, one could also deduct $300 or $600 in charitable deductions if one did not itemize; this was a change made in the CARES Act. I think that provision is going away this year or next.
 
Before making a substantial donation earlier this year, I was told by my tax man that I could use it not only against capital gains but also against my AGI this year. I have lost the relevant tax code citation and would appreciate any input from any of you who have used this. Thanks so much .

How exactly did you make the donation, and was it to a 501c3 charity?

It might be a Qualified Charitable Distribution if you are at least 70 1/2 and the money was sent directly to a charity from your IRA. That reduces your AGI, but it doesn't have anything to do with capital gains.

If you sold stock that was in a taxable account at a loss and then gave the cash to a charity, then that would reduce your capital gains and you would also have a deduction on Schedule A that will end up reducing your AGI, but only if your itemized deductions are higher than the standard deduction.

If you did something else, you're going to have to provide more detail.
 
Before making a substantial donation earlier this year, I was told by my tax man that I could use it not only against capital gains but also against my AGI this year. I have lost the relevant tax code citation and would appreciate any input from any of you who have used this. Thanks so much .
Just look at your 1040. All of your income is added up and totaled on line 9. Adjustments from Schedule 1 (like HSA contribution) are subtracted and your AGI is on line 11. Your donation and other deductions are carried over from Schedule A onto line 12a where it is subtracted from your AGI along with a few other things on line 15 for your taxable income.

On line 16 you calculate the tax. If you have cap gains and dividends, you will use the Qualified Dividends and Capital Gains worksheet. If you step through all of the lines you will figure out that your deductions are first used against ordinary income (I think this is what you mean when you said it is used against AGI??), and then it is used against your LTCGs and QDivs, which is the order you want--the higher tax rate ordinary income first, and then the preferred rate income.

Note that those deductions come AFTER the AGI is calculated, so charitable and other deductions do not help in calculations for ACA subsidies, IRMAA levels and anything else that uses AGI/MAGI rather than taxable income.
 
Yes, the wash sale rule is something to be aware of.

But the wash sale rule only applies when shares are sold at a loss and other substantially identical shares are purchased in the 61 day window surrounding the sale date of the shares with the loss.

None of the examples in this thread - including yours - are likely to meet those criteria.

Also, in the cases where wash sales occur, any capital loss is added to the basis of the replacement shares, which means the capital loss just gets deferred until the replacement shares are sold later.

SecondCor521,

But in my explanation I did specify that exact same stock index fund. The WSR says the same or substantially the same. So buying the same fund within that 61 day window of the fund you want to use the losses for TLH is a violation. Please correct me if that is wrong.

And it is not enough to turn off reinvesting cap gains and dividend for that fund in the taxable account, you need to turn them off in any account IRA and Roth IRA both if you hold the fund from which shares you want to TLH AND at Fido or Schwab or any place where you hold that exact fund or substantially the same. That's why I said this is tricky, you need to be aware of these things that probably would not even enter your mind until you learn about it.
 
SecondCor521,

But in my explanation I did specify that exact same stock index fund. The WSR says the same or substantially the same. So buying the same fund within that 61 day window of the fund you want to use the losses for TLH is a violation. Please correct me if that is wrong.

I don't know what WSR means. The IRS term is "substantially identical", and the same mutual fund would obviously meet that criteria. We are in general agreement on that point.

The issue I was raising with your example is that - at least it seemed to me based on what you wrote - you were trying to apply the wash sale rule to a period involving a gain. From your earlier post which I was alluding to:

If you sold the stock index mutual fund but had bought sales directly or via reinvestment of dividends or capital gains 30 days prior to and 30 days after the sale that created the $40k cap gain then you can not use the 2021 capital loss to offset the gain because you just violated the Wash Sale Rule.

(Emphasis added.) That is generally not correct the way you wrote it. The period that matters is the 61 day timeframe around when the capital loss occurred, which in this example happened in 2021. The 61 day period around any capital gain is generally irrelevant to the wash sale rule.

(I did interpret that cap loss in 2021 as being more than 31 days prior to the sale that created the $40K cap gain, but I think that is a reasonable reading of the example.)
 
Last edited:
Also, Vanguard isn't going to know what funds I own at TIAA. (I own S&P 500 index funds in both places.)
So if I do a tax loss sale of VFIAX at Vanguard, they won't be able to claim a wash sale due to automatic dividend reinvestment at TIAA.

I suppose the IRS might be able to detect that wash sale if they scrutinized my records, but I don't think they do that routinely.

I'm talking conceptually here, not recommending any illegal activity...
 
Another thing to manage/take advantage of/worry about is the matching of STG, LTG, STL, LTL. Remember that: short is matched to short, long to long, then short to long / long to short.

For example, this year (with the market down), YTD I have some short term losses (some losses realized on trying to catch the bottom on a few things), long term gains (trim of some long term super winners like Apple to reduce single stock exposure). All things being equal, I don't want to end the year this way because my valuable (up to 3k) STL will be offset by my valuable (in terms of lower tax rates) LTG.

So my strategy has been when closing positions on which I have multiple lots w/STG is to take the one with the biggest gain instead of the one with the highest cost. Why? Because I would like to get my STG/STL as close to zeroed by year end so that my realized LTG are utilized with the favorable tax rate. It also means I should consider selling position lots where I have a LTL, again because eventually when I sell something with a LTL that can't be offset with a STG (or even LTG), I get less tax advantage from that sale. It also might mean selling a position (or part of a position) with a STG and turning around and buying it back....to ironically capture the STG (and also reestablish the position with a higher cost basis to reduce eventual taxes on that position). Remember, no wash sale issue on a gain.

The above (harvesting gains) is also useful for a child account where the first $2k or so in income are at 0% rates. So sell a position (or part of one), take the gain, and rebuy the position. Now their basis is higher on the position...and when they eventually down the road realize it will have less taxes due to the higher basis.
 
Back
Top Bottom