I gather your income records, your debts, and the source of your down payment, then review your credit file with you. That’s where the surprises show up: a closed account still reporting, a balance flagged late in error, a credit line whose limit weighs more than its balance.
Your bank gives you its number, using its criteria. If your income falls outside the usual frame (bonuses, self-employment, a recent job), another lender can read the same file differently and arrive at a different amount. I obtain the amount and validity period from the lender whose method works in your favour, before you make an offer on the strength of a single opinion.