Capital Gains Tax & Divorce Question

Hi, I am in the middle of a divorce and we are selling our marital home. I think my circumstances may be unique, I'm not sure. But I couldn't find an answer to my specific question. So here's the scenario:

 

We purchased our home in May 2021. Due to her infidelity, I moved out of our home in October 2022. She stayed in the house. Fast forward to July of 2024 and I'm now getting around to filing for divorce. We are also finally listing our marital home for sale tomorrow (July 10, 2024). I have not filed the divorce complaint yet but I want to ensure I handle the home sale properly.

 

We expect the home to sell/close within the next 3 months with proceeds amounting to $160K if the home sells for the list price. I moved out of the house 7 months short of the 2-year mark. I fear I will have to pay the capital gains on my half of the proceeds ($80K). So, my questions are:

 

1. Will I have to pay the tax? The total proceeds are less than the $250K threshold for individual capital gains exclusion and far less than the $500K joint exclusion.

2. If I do have to pay the tax, how can I avoid paying this tax? Is there any language I could put into the divorce decree that would allow me to use the capital gains exclusion?

3. Is there a way to avoid paying this tax that doesn't involve an agreement with my ex? She will not agree to anything that would benefit me in any way. 

4. Is it better to sell the house after the divorce is finalized or before?

 

I just don't want to have to pay that tax because I feel like I was forced/compelled to move out of the home for my sanity. So she is the reason I left in the first place. If not for her, I would still be in the home. If we were to sell, I wouldn't have to worry about this because I would meet the 2-year threshold. Please help!