Williams-Sonoma Inc reported a surprise profit on Wednesday as the upscale home furnishings chain's cost-cutting efforts bore fruit.

The operator of Williams-Sonoma cookware stores and Pottery Barn furnishings outlets posted a second-quarter net profit of $399,000, or break-even, down from $18,384,000, or 17 cents a share, a year earlier.

Excluding items, it earned 5 cents a share, while analysts on average had expected a loss of 9 cents a share, according to Reuters Estimates.

Net revenue fell 18 percent to $672.1 million. Sales at stores open at least a year fell 15.3 percent.

(Reporting by Dhanya Skariachan, editing by Gerald E. McCormick)