Updated from 7:20 a.m. EDT

Home Depot

(HD) - Get Report

has made progress on its own home-improvement project in the second quarter, but the company remains a fixer-upper -- even as its chief rival starts to look more like a showcase.

The retail chain beat earnings expectations on improving sales in the quarter. But the company saw a decline in some key sales figures, and its overall revenue growth trailed that of its main competitor,

Lowe's

(LOW) - Get Report

, which reported its second-quarter results on Monday.

"It's good that they beat expectations, but Lowe's beat expectations by a lot more," said one hedge fund analyst who has no position in Home Depot, but who is long Lowe's. "Home Depot gave up market share to their competitor."

Other investors seemed to share in the analysts' assessment, as Home Depot stock dropped after its report. In recent trading, the company's shares were down $1.22 or 3.6%, to $32.68.

In contrast, Lowe shares, after posting a 6% gain on Monday, were trading up again on Tuesday. In recent trading, Lowe's was up 34 cents, or 0.65%, to $52.30.

Home Depot has struggled in recent years with slowing sales and aging stores. In the fourth quarter of last year, for instance, the company posted a decline in both revenue and profits.

And in both the fourth quarter last year and the first quarter this year, the company posted declines in same-store sales. Same-store sales, which compare results at outlets open for more than one year, are a widely watched indicator of retail growth and market-share changes.

TheStreet Recommends

In response, the company has embarked on an effort to renovate its stores and improve its merchandise assortment to boost sales.

That effort seems to be paying off. In Home Depot's just-completed second quarter, the company's overall revenue grew by 10.5% to $18 billion. Meanwhile, the company's earnings grew by 9.9% to $1.3 billion, or 56 cents a share.

The results beat Wall Street's expectations. Analysts surveyed by Thomson First Call were expecting Home Depot to earn 54 cents a share on $17.6 billion in sales.

But Home Depot's outperformance looked pedestrian compared to Lowe's. In its second quarter, Lowe's earned 75 cents a share, while analysts were expecting profits of 69 cents per share.

Likewise, Home Depot posted what was for it a solid sales performance. In addition to its double-digit overall revenue growth, the company's same-store sales increased 2.2% in the quarter. That compared favorably, not only with the same-store sales declines in recent quarters, but with the mere 1% same-store sales gain in the year-ago quarter.

But again, the company's performance was topped by that of its rival. Lowe's same-stores sales grew by 6.9% in the second quarter, on top of a 6.8% gain in the same quarter last year.

Meanwhile, Home Depot's results didn't look as good on closer inspection. The number of transactions the company recorded in the quarter and its average ticket both increased. But the average weekly sales per store declined 2.5% to $861,000. And the company's average sales per square foot declined 1%, company officials said.

"On a lot of metrics, Lowe's took Home Depot to task," said the fund analyst.

Home Depot also saw mixed results on its expenses. The company's gross profit margin, which represents the difference between what it charges for its goods and services and what it pays for them, increased 77 basis points to 31.16% of sales.

A drop in markdowns, and an increase in directly imported products, where the company cuts out middlemen, helped Home Depot improve margin in the quarter, said company CFO Carol Tom¿ on a conference call with investors and analysts. But Tom¿ warned that the company doesn't expect to see much more improvement in its gross margin in the rest of the year.

In terms of operating expenses, Home Depot had less success in the quarter. Its marketing and store operating expenses jumped 69 basis points as a portion of sales to 17.96%. And its general and administrative expenses increased 17 basis points to 1.62% of sales.

Tom¿ blamed the climbing costs on an rise in medical expenses, especially worker's compensation charges, and increased spending on information technology and on the company's growth initiatives.

Home Depot reiterated its expectations of 9% to 14% earnings growth this year over last year's profits of $1.56 a share. But the company earnings have already grown by 11.6% through the first two quarters this year, making its second-half earnings targets fairly easy to reach. The company would only have to grow second-half earnings by 5.6% to reach the low end of its full-year guidance.

"They've set the bar really low," said the hedge fund analyst, whose fund used to be among the largest holders of Home Depot stock.