Updated from 7:53 a.m. EDT

Rising fuel prices, a bugbear for most of the retail sector, are helping Home Depot ( HD), the remodeling giant that reported a surge in second-quarter earnings Tuesday and guided the rest of the year higher.

The Atlanta-based retail chain earned $1.55 billion, or 70 cents a share, in the three months ended Aug. 1, up about 18% from earnings of $1.30 billion, or 56 cents a share, last year. Sales rose 11% to $19.96 billion, while same-store sales increased 4.8%, helped by sales of power tools and appliances.

Excluding items, Home Depot earned 71 cents a share in the most recent quarter. Analysts surveyed by Thomson First Call had been expecting earnings of 64 cents a share on sales of $20.17 billion.

Executives said on a conference call that while higher gas prices probably crimped the urge to leave the house, they gave homeowners more incentive to weatherproof and economize.

"If in fact higher fuel prices are affecting the consumers, they're doing it in a fashion that's supportive for us," said Chief Executive Bob Nardelli. "Housing turnover has been significant in the last two years ... People are doing more improvement projects. I think we're benefiting from it."

Said John Costello, vice president of merchandising and marketing: "The consumer is more interested than ever in the range of Energy Star products from appliances to digital thermometers to insulation."

Still, he noted, "We will see some impact on the consumer side" from higher gas.

Nevertheless, for all of 2004, the company now expects year-over-year earnings growth of 14% to 17%, up from previous guidance of 10% to 14%. It left intact its 2004 sales growth estimate of 10% to 12%.

Shares of Home Depot, which jumped about 3% Monday on a similarly strong earnings report from rival Lowe's ( LOW), were up another $1.35, or 4%, to $35.33 in Tuesday's session.

Same-store sales by month were up 6.6% in May, 4% in June and 4% in July, said Home Depot CFO Carol Tome. The monthly results showed a similar deceleration in sales as the quarter progressed and were similar to Lowe's results released Monday .

"Like many retailers, the first part of June was the softest in the quarter," said Tome. "We think this performance was weather-related. Two weeks into the third quarter, our comps are running considerably ahead of second-quarter performance."

The company said the second quarter's results were the best in four years, with positive same-store sales reported in every geographic region across North America.

Gross margin in the quarter expanded 220 basis points to 33.7% of sales, Home Depot said, citing lower theft levels and a change in product mix. Operating expenses in the quarter increased about 140 basis points to 21.06% as a percent of sales. And operating margin expanded to 12.31% as a percent of sales, up roughly 80 basis points. It was the highest return on sales in the company's history, Home Depot said.

Over the past two years, Home Depot said it has focused on its merchandising to provide customers what they need to improve their homes. That has included new appliances, kitchen and bath products, lighting, fans and moldings. "Our customers are looking for gratification and they have higher aspirational desires," said Nardelli.

But the company was hesitant to hold both positive and negative external factors responsible for the latest quarter's results. "We believe our performance and our ability to execute is all up to us," said Tome.

In the second quarter, the company said the average purchase by a single customer was $54.73, up 8.2% from a year ago. The gain came across each of Home Depot's selling categories and also due to the increase in commodity price, especially in lumber and building materials.

Price increases in steel, copper and lumber contributed 200 basis points to overall same-store sales. Home Depot said it used "buying power to minimize the impact on customers."

Home Depot noted that it had 33 stores affected by Hurricane Charley, which hit parts of Southern Florida late last week. The stores stayed open as long as local governments would allow selling tarps, plywood and roofing materials. They re-opened on Saturday using generators.

In September, Home Depot will open its first store in Manhattan, which it says was "designed to meet the needs of Manhattan shoppers" in terms of convenience, store layout, merchandise and price.

Shares of Lowe's were riding Home Depot's success, lately up 79 cents, or 1.6%, at $49.93.