TJX Cos.'s (TJX) second-quarter earnings rose 31% amid stronger sales and margins, and the off-price retailer indicated it sees more strong results ahead as it expands its number of stores and customers.

TJX, which buys fashion brands and home furnishings at prices below wholesale and sells them at steep discounts, said its back-to-school season is off to a solid start and anticipates the momentum will continue.

"We believe we have more opportunities in front of us than ever before," said Chief Executive Carol Meyrowitz during a conference call.

Meyrowitz said TJX is opening more stores than expected this fiscal year, about 90, and even more in the next fiscal year because of real estate opportunities and customer demand.

The parent of T.J. Maxx, Marshalls and other chains is building its vendor base to offer more varied merchandise, and even though its average sale is down, customer traffic is accelerating pretty much across the board, positioning TJX for a big boost as consumer spending picks up, Meyrowitz said.

Still, shares were off 3.6% to $34.12 as investors respond to the retailer's earnings and outlook.

TJX reported a second-quarter profit of $261.6 million, or 61 cents a share, up from $200.2 million, or 45 cents a share, a year earlier. Wall Street was expecting 59 cents. Lower interest expense and tax rates added 3 cents to the earnings, taking away from their "quality," said Morgan Stanley retail analyst Michelle Clark in a research note.

Other analysts were impressed and said TJX cannot only hold, but can expand upon its gains. TJX is often thought of primarily as a retailer that does well in a down economy, "but conventional wisdom is wrong," said Todd Slater, retail analyst at Lazard Capital Markets. "TJX performs equally well in an improving environment as comps accelerate while TJX's price and value advantages widen when department stores promote less."

TJX's second-quarter revenue increased 4% to $4.75 billion. Analysts polled by Thomson Reuters most recently were looking for revenue of $4.73 billion.

TJX also offered outlooks that could miss expectations, projecting earnings of $2.26 to $2.38 per share for the full year, while analysts were looking for $2.36.

For the third quarter, TJX expects earnings of 62 cents to 68 cents on same-store sales growth of 2% to 4%. Wall Street was looking for 63 cents.

The outlook continues the conservative guidance that many retailers have been providing as they post second-quarter results and TJX executives during the conference call did not rule out the prospect of upside to their projections.

Same-store sales rose 4% during the second quarter, while discounter Target Corp. (TGT) saw comparable-sales fall 6.2% and luxury retailer Saks Inc. (SKS) experienced a 15.5% drop.

TJX earlier this year slashed costs and inventories. The company last month also unveiled a $400 million notes offering to help refinance debt coming due in December.

The company in July projected earnings at the high end of its raised estimate of 56 cents to 59 cents.

Gross margin rose to 25.6% from 24.3% on strong merchandise margins.

-By Karen Talley, Dow Jones Newswires; 212-416-2196; karen.talley@dowjones.com

(Tess Stynes contributed to this story.)