CA form 593 & IRC section 121(b)(5)(C)(ii)(I) nonqualified use Loophole - Home Sale - best method puzzle

I'm looking for California tax advice on CA form 593 to submit to the title company next week (we are selling our house) in regards to a loophole discussed by Jorgen Olson, JD regarding the nonqualified use ratio loophole section IRC 121 for the sale of a primary residence ($250,000/$500,000 exclusion). 

 

I've been reading about it and trying different approaches but I'm unsure if I understand all the ins and outs correctly so I'd like expert opinion(s) on the most beneficial approach. So, I'm putting it out to the community for anyone who likes a puzzle.

 

I am interested in the 2nd loophole Jorgen talks about at the end of his article, (under the "Another Loophole" section see link below) where he talks about another limitation to the exclusion under IRC section 121(b)(5)(C)(ii)(I) relating to “nonqualified use.” (For use other than as a primary dwelling. The exclusion will be modified by the nonqualified use ratio, based on the time allocated to nonqualified use (the numerator) and the total time of ownership (the denominator). The resulting portion of the gain is not eligible for the exclusion (see the article for his full text and explanation).

 

Here is a link to Jorgen's article in the CPA Journal:

 

https://www.cpajournal.com/2020/02/05/how-the-loophole-in-irc-section-121-can-benefit-homeowners/

 

He says that the taxpayer could be given advice to make choices that could benefit them in the future. In our case, however, those decisions are already set (see below) and I'm just trying to find out the best method to use for our specific details.

 

Here are OUR specific details for the puzzle:

 

-- My wife and I are selling our California house that we have jointly owned for 9 years (April 2012 to April 2021). We are set to close in April 2021.

-- We will be filing a joint tax return.

-- The house was our primary residence for the FIRST 64 months (divided by 12 months = 5.3333 years as our primary residence).

-- Then we rented it for the LAST 44 months (divided by 12 months = 3.66666 years of rental).

-- $249,364 = our Adjusted Cost Basis (original cost plus sales tax and expenses & commissions and improvements)
-- $247,000 Fair Market Value when we started renting it Aug. 2017
-- $495,000 = sale price in 2021

 

I will be filling out California From 593 for the title/escrow company closing. So, any information/insights/examples you can provide about the most financially beneficial approach to use and how I input that approach into CA Form 593 would be greatly appreciated.

 

Thanks in advance!