Top U.S. retailers reported better-than-expected sales gains for June after smartly targeted bargains lured shoppers contending with a wobbly economy.

Retailers such as Macy's Inc , Costco Wholesale Corp , Target Corp and Gap Inc all beat Wall Street estimates, suggesting stores have grown savvier in how to offer discounts without compromising sales numbers.

The 25 chains tracked in Thomson Reuters' monthly sales tally reported a 6.5 percent gain in sales at stores open at least a year, beating the 4.9 percent rise that Wall Street analysts expected.

J.C. Penney was one of a few losers, missing estimates and deeply cutting its quarterly earnings forecast after it had to do too much discounting. Its shares fell 2 percent.

Consumers remained under pressure last month from high food and gasoline prices, prompting retailers to offer deals to get them to shop. But the strategy apparently succeeded.

They are very focused on making the right offer to the consumer, in contrast to the uneducated sales we saw during the crisis, said Janet Hoffman, global managing director for Accenture's Retail Practice. The sales now are much more targeted.

Shoppers also got a break from an improving job market. U.S. private employers added far more jobs than expected in June, bouncing back from a surprise slump the month before, a report by a payrolls processor showed.

Limited Brands Inc easily exceeded a 3.8 percent forecast with a 12 percent jump, helped by big gains at Victoria's Secret.

Macy's said same-store sales were up 6.7 percent in June, ahead of analysts' estimates, and it raised its own forecast for quarterly sales. Target's comparable sales rose 4.5 percent, also beating Wall Street.

Target shares were up 7 percent, while Macy's were up 3.1 percent.

Gap posted a surprise rise in same-store sales, helped by a smaller-than-expected decline at its namesake stores in North America.

Penney admitted that it had to use more promotions to try to win over its shoppers. It now expects quarterly same-store sales to rise about 1 percent to 2 percent, down from its prior forecast of 3 percent to 4 percent.

The company forecast quarterly earnings of 6 cents per share, including charges, down from May's outlook of 20 cents to 24 cents, including about 6 cents in charges.

Penney rivals Kohl's Corp and Dillard's posted same-store sales gains.

At the other end of the price spectrum, high-end department store chains Saks Inc and Nordstrom Inc easily beat Wall Street forecasts. Saks' comparable-sales rose 11.9 percent, and Nordstrom's, 7.9 percent.

BACK-TO-SCHOOL PROMOTIONS

Many analysts caution against reading too much into the strong numbers for June, since that is when retailers typically cut prices on spring and summer items to make room for back-to-school and fall merchandise.

Stores will probably have to keep offering discounts as they kick off the important back-to-school season.

While consumers showed a willingness to spend, July is where consumers can pull back and think about where they can get bargains, said David Bassuk, a managing director at consulting firm AlixPartners.

Consumer confidence took a hit in June as shoppers fretted about high unemployment, prompting many to open their purses and wallets only tentatively.

The economy has changed (my shopping habits) big-time, said Karen Anderson, a 41-year-old stay-at-home mother from Frankfort, Illinois. I definitely wait for sales.

(Additional reporting by Jessica Wohl and Eunju Lie in Chicago, Dhanya Skariachan and Martinne Geller in New York, and Nivedita Bhattacharjee in Bangalore; Editing by Lisa Von Ahn)