Bed Bath & Beyond Inc. (BBBY) posted fiscal second quarter results after Wednesday’s closing bell that narrowly surpassed analyst expectations as same-store sales improved, helping the stock price reverse course from a red session to notch gains in extended trading.

For the quarter ended August 31, the Union, New Jersey-based home furnishings retailer reported revenue of $2.824 billion, up 8.9 percent from $2.593 billion in the year prior quarter.  Net earnings totaled $249.3 million, or $1.16 per share, versus $224.3 million, or 98 cents per share, in the second quarter last year.

Wall Street was expecting EPS of $1.15 on revenue of $2.81 billion.

Comparable store sales in the latest quarter improved 3.7 percent.  In the second quarter last year, same-store sales were up by 3.5 percent over the 2011 quarter.

With rising sales, came rising costs.  Selling, general and administrative expenses rose from $667.53 million to $723.72 million.  Total cost of sales increased from $1.56 billion to $1.71 billion.

During the quarter, the company bought back about 3.5 million shares of its common stock for an aggregate amount of $257 million.  The existing plan still has approximately $1.8 billion in repurchases authorized.

Bed Bath & Beyond operates a total of 1,484 stores under its namesake brand, World Market, Cost Plus World Market, Cost Plus, buybuy Baby, Christmas Tree Shops, andThat!, Harmon and Harmon Face Values.  Total retail space is 42.3 million square feet.

Looking at the current quarter, the company is modeling net earnings per share in the range of $1.11 to $1.16.  For the fourth quarter, BB&B sees profits between $1.70 and $1.77 per share.  For all of fiscal 2013, earnings are anticipated to be between $4.88 and $5.01 per share.  The guidance hit the upper end of expectations.

In the first quarter, Bed Bath & Beyond’s profits slipped 10 percent compared to the first quarter of 2012, snapping a streak of two straight quarters of rising profits (up 7 percent in Q4 2012 and 2 percent in Q3 2012).

Shares of BBBY closed the day down by 0.8 percent on the day at $74.22.  In extended trading following the earnings report, shares perked back up, rising to $77.90 for gains of 3 percent on the day.  So far in 2013, shares are ahead 32 percent through Wednesday’s closing price.