Affordability is set by two ratios rather than one. The front-end ratio is housing cost divided by gross monthly income. The back-end ratio, which usually binds first, is total monthly debt obligations divided by gross monthly income. A lender caps each, and the lower of the two resulting prices is the answer.
Here is the $425,000 duplex worked from the income side. $125,000 a year is $10,417 a month. At 28%, housing could run $2,917. At 43% of income, total debt could run $4,479, and $1,650 of existing car and student loan payments leaves $2,829 for housing, so the back-end ratio binds. With $85,000 down, the $340,000 loan at 7% over 30 years costs $2,262 a month, and taxes plus insurance at 1.6% of price add $567: $2,829, which lands on $425,000. This example counts personal income only. Any rent a lender credits would raise the ceiling.
On an investment property the calculation changes shape, because the property generates income itself. Lenders commonly credit a portion of projected rent rather than all of it, and the haircut covers vacancy and management. The alternative route is a DSCR loan, which removes personal income from the file and qualifies the property on its own coverage ratio instead.