We build a model of optimal fixed-rate mortgage refinancing with fixed costs and inattention and derive a new sufficient statistic that can be used to measure inattention frictions from simple moments of the rate gap distribution. In the model, borrowers pay attention to rates sporadically so they often fail to refinance even when it is profitable. When paying attention, borrowers optimally choose to refinance earlier than under a perfect attention benchmark. Our model can rationalize almost all errors of “omission” (refinancing too slowly) and a large fraction of the errors of “commission” (refinancing too quickly) previously documented in the data.