Investors & landlords

You should qualify for the exclusion based on your facts.

See attached link to Publication 523 and specifically look at page 11.

https://www.irs.gov/pub/irs-prior/p523--2020.pdf

Exceptions. The following situations of business or rental usage don’t affect your gain or loss calculations. • Space within the living area. If the space you used for business or rental purposes was within the living area of the home, then your usage doesn't affect your gain or loss calculations. Examples of spaces within the living area include a rented spare bedroom and attic space used as a home office. In contrast, business or rental spaces not within the living area affect your gain/loss calculations.

As long as the rented bedroom was within your primary home living area, which you indicate is true, you will qualify for the full exclusion.

However, any depreciation taken or should have been taken, will be subject to depreciation recapture at 25%.  This is Section 1250 gain.

*A reminder that posts in a forum such as this do not constitute tax advice.
Also keep in mind the date of replies, as tax law changes.