Lenders look at two versions. The front-end ratio counts only housing costs (principal, interest, taxes, insurance, and HOA dues). The back-end ratio adds every other monthly debt payment: car loans, student loans, credit card minimums, and child support.
A common guideline is 28% front-end and 36% back-end. Many loan programs allow more — conventional loans can go to about 45% to 50% with strong credit, and FHA loans often allow higher ratios with compensating factors. A lender approving you for a payment doesn't mean it fits your budget.