Get your taxes done using TurboTax

I've read Pub 527 multiple times, but what I am asking is not answered.  I've also read I.R.C. § 121(a) (Exclusion Gross income from sale of the property) which states if I meet the 2 year rule -  which I do - up to $250,000 in capital gains can be eliminated when I sell the home, except there are some limitations on how much of the gain can be excluded from tax, so not everyone would qualify to get the full $250,000 of gains excluded from tax even if they met the 2 out of 5 year residency test.  As explained in I.R.C.§ 121(b)(5) (A) Exclusion Of Gain Allocated To Nonqualified Use: "In General —  Subsection (a) shall not apply to so much of the gain from the sale or exchange of property as is allocated to periods of nonqualified use."Regarding I.R.C. § 121(a)b)(5)(B) (i)(ii)  "Gain Allocated To Periods Of Nonqualified Use: For purposes of subparagraph (A), gain shall be allocated to periods of nonqualified use based on the ratio which - (i) the aggregate periods of nonqualified use during the period such property was owned by the taxpayer, bears to (ii)  the period such property was owned by the taxpayer." A tax professional from TurboTax on the phone warned me that if I rent out a bedroom while living in my house next year - so I would consider it my principle residence which seems to be the criteria IRS uses,  the IRS, according to this tax expert, might consider that a period of "nonqualified use." Presumably this is because I would not be using the rented bedroom, thus would be documenting "Zero" personal use days, as there is no way to show we are both sharing the same residence even if we do not share bedrooms. So, do you think that if next year, for the entire year from 1/1/23 to 12/31/23, I rent out one bedroom of my principle and only residence, and I report "Zero" personal use days, and 365 rental days - because the question only relates to the bedroom I am renting out - when I sell the house will the IRS consider me to have accrued any "nonqualified" days in 2023 which would then result in less capital gain that qualifies for exclusion from taxes? I you are uncertain, can the question be elevated to a tax expert who is familiar with how the IRS treats tends to determine how much of the capital gains can be excluded when someone rents out a single bedroom of their primary residence as opposed to renting out an entire home that the renter is not living at.