Q about the Residency Requirement to get full exclusion of Capital Gain on Sale of Home

I've downloaded IRS Publication 583, and understand most of the requirements.  However, trying to apply the rules to my specific situation, leads me to ask the experts here.

 

My wife and I (we are MFJ) were married in April 2022.  We each own a house, both for more than 20 years.

We are looking to sell one or both of these houses, and seeking to minimize our capital gain.

 

I understand the ownership requirement (2 years out of the last 5 years prior to sale) but the residence requirement (also 2 years out of the last 5 years and each spouse needs to meet this if MFJ) has me spooked.

 

We each individually owned the houses until we were married in 2022.  We now own the houses as community property (California).  I don't think that matters as to the ownership requirement.

 

But the residence requirement is tricky.  We've only been "residing" together for less than the 2 years out of the last 5. But we met the residency requirements as single adults, just not as a married couple. 

 

So here's the question.

Does anyone know if the residency requirement for a couple can include the time residing in the house as a single person before getting married?   Any help would be appreciated.