Calculating Capital Gains when selling a house.

Recently I read that if a spare room of a house is rented out this is considered business usage that negatively impacts capital gains exclusion when the house is sold. Basically, I gathered from what the person wrote whom I do not believe is an expert, the percent of square footage of the house rented out would result in a reduction by the same percentage of the amount of profit qualifying for capital gains exclusion. Is there any adjustment that takes into account the years of personal use versus rental use of the same spare bedroom? Would the reduction in the amount of capital gains exclusion recaptured be less if someone only rented the bedroom out for 1 year versus if they had rented the same bedroom out for 10 years? I am unsure if the writer was just oversimplifying her explanation of depreciation recapture that would occur.