Costco's

(COST) - Get Report

second-quarter earnings rose 34.7% from a year ago, thanks in part to a tax-related gain. However, the results missed estimates and the shares eased.

Costco earned $305.5 million, or 62 cents a share, in the quarter, compared with $226.8 million, or 48 cents a share, last year. Backing out the gain and some pre-opening expenses, earnings were $263.3 million, or 54 cents a share. Revenue rose 10% from a year ago to $12.7 billion.

Analysts surveyed by Thomson First Call had been calling for earnings of 55 cents a share on revenue of $12.6 billion. The stock fell $1.11, or 2.4%, to $45.60.

Costco said same-store sales rose 7% in the second quarter compared with a year ago, reflecting a gain of 6% in domestic stores and 13% in international stores.