You should probably ask a professional but the rental ratio applies to the capital gains and not to the exclusion. In other words, if your nonqualified use is 50%, and your gains are $600k, you'd get the full exclusion since .5 * $600k > $250k.
To put it another way,
Sale price - (cost+improvement) = gain
gain * nonqualified use ratio = taxable gain due to being a rental
The other half of the NQR, which is the same in this example, can be excluded but is of course maxed out at $250k.
Therefore, if you sold at $975k,
$975k - $375k = $600k gain
$600k * 1/2 = $300k taxable gain
That leaves $300k where $250k is excluded and the remainder, $50k, also becomes taxable.
IRS Section 121 describes the exclusion and Pub 523 describes how it works.
https://www.irs.gov/publications/p523Edit: Renting out 1 bedroom of a 2 bedroom is unlikely to
be 50% personal use affect gains calculations. See Pub 523 exception "Space within the living area".