cost basis, appreciation and captial gains for a long-term primary home with 1-2 years rental

simple question, hopefully simple answer, considering a single tax filer situation:

 

2000: bought home for $100,000

2018.12.31: home appraised for $250,000

2019.01.01: rented home for 1 year for total income of $12,000

2020: sold home for $250,000

 

Questions/Scenario:

- if home had been a non-rental, it would qualify for capital gains exclusion

- if home has been a rental for entire 20 years, would have to pay capital gains on $250k-$100k = $150,000

- question: since home was rented for one year and the "basis" at 2019 beginning was the same at which is sold for in 2020, are capital gains calculated on new 2019 basis or the original 2000 sale price/basis. 

 

the reason for asking this is that it's obvious that the 1-year rental would actually cost the owner more money in capital gains than the 1-year rental income, if the basis is set at the 2000 value. Therefore, it would be dumb to have rented it out for this 1 year. Assuming 15% capital gains:

 

Scenario1: 15% * (250,000-100,000) = $22,500 capital gains > $12,000 rental income

Scenario2: 15% * (500,000-500,000) = $0 capital gains <$12,000 rental income.

 

So this question gets to the disingenuity of the IRS: will they allow a personal capital gains appreciation exclusion for the first 19 years since the home wasn't a rental and then only consider capital gains on the last 1 year, in which it was a rental, or do they basically say sorry folks, we want all years of capital gains. Scenario1 seems fundamentally unfair/unjust. But it wouldn't surprise me since working class folks cannot write off their car miles to and from work, while business folks can.