It takes tax filing status and modified adjusted gross income from two years earlier, finds the income-related monthly adjustment amount bracket for Part B and Part D, and shows the surcharge, the household's yearly total and how much income room is left before the next bracket. See the IRMAA calculator.
IRMAA brackets are cliffs: one dollar over a threshold triggers the whole surcharge. That makes the "income room before next bracket" result a powerful planning prompt for Roth conversions and capital gains — and a reason a Medicare client will happily talk to you in the off-season. Life-changing events such as retirement can be reported to Social Security on form SSA-44.