To calculate your debt-to-income ratio, divide all your monthly debt payments by your gross monthly income. This number is one of the ways lenders assess your ability to manage the monthly mortgage payments for the loan amount you are considering.