* 2nd-qtr adj EPS of $1.42 vs est $1.49
* 2nd-qtr comp sales rise 5.4 pct vs est 5.6 pct
* Shares marginally down in extended trading (Adds background, share price)
March 7 (Reuters) - Costco Wholesale Corp on Wednesday missed estimates for quarterly profit and same-store sales, as the retailer faced stiff competition from Walmart and Amazon in a cut-throat U.S. retail industry.
The membership-based retail chain's heavy spending on bolstering its e-commerce capabilities and matching Amazon.com Inc's prices in the last year have taken a toll on its bottom line.
Excluding items, Costco earned $1.42 per share, missing analysts' estimates of $1.47, according to Thomson Reuters I/B/E/S.
However, Costco has been one of the few retailers that has held its own since Amazon's acquisition of Whole Foods earlier in 2017, a deal that sent jitters among traditional grocery retailers and their investors.
The company's shares have since bounced back, from their initial fall, and hit a record high in January.
Net income attributable to the company rose to $701 million, or $1.59 per share, in the second quarter ended Feb. 18, from $515 million, or $1.17 per share, a year earlier.
The company had a $74 million gain in the reported quarter related to changes in the U.S. tax law.
Comparable-store sales, excluding the impact of fuel and currency changes, rose 5.4 percent. Analysts on average had estimated a 5.6 percent increase.
Total revenue climbed 10.8 percent to $33 billion, edging past expectations of $32.75 billion.
Issaquah, Washington-based Costco's shares fell slightly in after-hours trading. (Reporting by Uday Sampath in Bengaluru; Editing by Shounak Dasgupta and Sai Sachin Ravikumar)