Me and my wife maxed out our Roth IRA contributions for tax year 2022. Few months ago, we both switched to new jobs. Now, our combined income puts us above the income limit to contribute to Roth IRA.
When attempting to undo the contribution, I read that we should account for any gains or losses. That calculating loss part is the problem for me. How can I distinguish losses realized by the contributions made in the prior year vs this year? I have bought/sold positions multiple times this year and I don't understand how to determine how much loss was realized just for this year's contribution. Any advice?
For example: let's say I had 13k in my Roth IRA on Jan 1, 2022 (12K contributions for the past two years and 1K in gains. Of the 13k, 2k is cash and rest is in stock). On Feb of this year, I contributed 6K for the year 2022. With 8K available cash in my Roth IRA, I bought stocks and had realized a gain of $500. I also sold positions that I had bought a couple of years back for 1K profit. At this time my IRA had 22.5K (5K stocks, 17.5 cash). I bought other positions with the cash, those stocks didn't do well, and sold for loss. The current valuation of my account is 11k.
In my scenario (for requesting return of excess), how can I distinguish between the losses realized by current year's contributions vs prior year contributions?
How do I request a return of excess in this kind of situation?