Sales, excluding automobiles, rose 4.9% from Nov. 1 through Christmas Eve, compared with a 3.7% gain in the same period last year, according to the Mastercard Inc. MA 0.21% unit, which tracks all forms of payment. E-commerce continued to drive the gains, rising 18.1%.

“It started with a bang in the week leading up to Black Friday,” said Sarah Quinlan, a senior vice president of marketing insights at Mastercard. She added that retailers benefited this year from Christmas Day falling on a Monday, giving shoppers a full weekend to scoop up last-minute purchases. Dec. 23 ranked next to Black Friday in terms of spending, according to Mastercard.

“Overall, this year was a big win for retail,” Ms. Quinlan said.