The median price rose to $277,750 in January, which was 6.8 percent higher than during the same period in 2012. It was the fourth consecutive month of price increases, the Warren Group said.

“We ended 2012 on a pretty positive note, and this is carrying into January,’’ said Timothy M. Warren Jr., the firm’s chief executive. “There are positive signs that 2013 will be a second year of recovery.”

Condominium sales also rose in January, by 10.9 percent compared with the same month a year earlier, according to the Warren Group. But the median price for condos slipped to $240,000, a 1.8 percent drop compared with prices at the same time last year.

The monthly housing data for Massachusetts came on a day when other real estate news showed that 2012 marked the official recovery of the state and US housing markets.

The S&P/Case-Shiller Home Price Indices, which measure repeat home sales in 20 US cities and are widely considered some of the best markers for housing values, reported Tuesday that in the Boston area, home values increased 3.6 percent in December, compared with December, 2011.

Nationwide, home values rose more dramatically in December — by 6.8 percent, compared with the same month in 2011.

David M. Blitzer, chairman of the index committee at S&P Dow Jones Indices, said that 19 of 20 cities measured showed improvements in December, compared with a year earlier.

“Housing and residential construction led the economy in the 2012 fourth quarter,’’ Blitzer said.

The state’s housing market reached its most recent peak in September 2005 and tumbled about 20 percent over four years before starting to slowly recover in 2009. Home values on average are currently 15.7 percent below that peak, according­ to Case-Shiller.

Brian Bethune, president and chief economist for Alpha Economic Foresights LLC, based in Boston, said rising home values increase the net worth of many homeowners, boosting their confidence and willingness to spend money on remodeling projects, cars, and other major items.

“It’s a self-reinforcing cycle that is obviously positive in terms of keeping the economy going,” Bethune said.

As values rise, real estate industry specialists say, more homeowners may be convinced to enter the fray by putting their properties up for sale. Increasing the inventory of available homes is considered crucial to extending the rebound.

There were 18,329 single-family homes for sale in Massachusetts on Jan. 31 — 27.3 percent fewer than at the same time last year, according to the Massachusetts Association of Realtors, which also released numbers Tuesday.

The number of condominiums statewide ­also fell, to 5,791, for a 32.8 percent drop compared with January 2012, the association said.

Kimberly Allard-Moccia, the association’s president and owner of Century 21 Professionals in Braintree, said she is concerned about the meager supply of properties for sale.

“We look to the home sellers to get off the fence and put their homes on the market,” she said.