Tis the season to be merrily shopping.

Overall retail sales rose 0.3 percent in November compared with the prior month, the Commerce Department said Thursday. Economists had forecast a decline from the month before.

Sales in November were 4.1 percent from a year earlier, outpacing inflation. The retail sales figures are seasonally adjusted to take account of the holiday shopping rush but not adjusted for changes in prices. The consumer price index rose 3.1 percent from a year ago, the Labor Department said this week.

Gasoline prices fell six percent in November, according to the consumer price index. Sales at gas stations fell 2.9 percent in November.

Excluding gas stations, retail sales rose 0.6 percent last month from October, an acceleration from the 0.1 percent increase in the prior month. Sales are up 5.4 percent compared with November of last year.

Retail sales account for around one-third of all consumer spending and are viewed as a window into the health of the household sector.

Sales at bars and restaurants were up 1.6 percent for the month, far more than inflation. People tend to eat out more when they feel secure about their family finances and the prospects for the economy. The University of Michigan’s consumer sentiment index showed a surge of optimism in early December.

The National Retail Federation said it expected holiday spending in November and December to increase three percent to four percent from last year, a slower rate of growth than seen in the prior two years. Gallup’s polling, however, indicates that Americans increased the amount they expect to spend on holiday shopping this year, which could boost sales higher than expected.

Sales fell at department stores and home centers such as Lowes and Home Depot, on both a monthly and annual basis. This could represent deeper discounts for holiday shopping events at stores.

Online sales were up one percent compared with October and 10.6 percent from 12-months earlier.

Sales at auto dealers rose 0.5 percent in November. Furniture store sales jumped 0.9 percent. Clothing stores saw a 0.6 percent increase. Sales at a category of stores that includes book stores, musical stores, hobby stores, and sporting goods stores rose by 1.3 percent.

Sales were up slightly at grocery stores and down at electronics and appliance stores.