* Q2 EPS $1.45 vs est. $1.39
* Q2 sales $1.29 bln vs est. $1.30 bln
* Raises FY12 EPS outlook to $3.58-$3.66 from $3.52-$3.60
* Lowers FY12 sales view to $4.58 bln-$4.65 bln from $4.61 bln-$4.68 bln
* Shares up 8 pct in after market
July 25 (Reuters) - Tractor Supply Co, a retailer of farm and ranch products, reported a higher-than-expected quarterly profit as it stocked fewer lower-margin products, and the company also raised its full-year earnings forecast.
The company -- whose earnings were also boosted by animal and pet related products like cages, leashes and pet food -- said gross margin increased to 34.9 percent from 34.1 percent a year earlier.
Tractor Supply raised its full-year earnings forecast to a range of $3.58 to $3.66 per share from $3.52 to $3.60 per share, but cut its sales forecast to a range of $4.58 billion to $4.65 billion from $4.61 billion to $4.68 billion.
Second-quarter profit rose to $106.6 million, or $1.45 per share, from $91.2 million, or $1.23 per share, a year earlier.
Revenue at Tractor Supply, which competes with companies such as Home Depot Inc, Sears Holdings Corp and Wal-Mart Stores in certain segments, rose 9.6 percent to $1.29 billion.
Analysts on average had expected earnings of $1.39 per share on revenue of $1.30 billion, according to Thomson Reuters I/B/E/S.
Shares of Brentwood, Tennessee-based Tractor Supply were up 8 percent in trading after the bell. They had closed at $79.05 on Wednesday on the Nasdaq.
Reporting by Juhi Arora and Ranjita Ganesan in Bangalore; Editing by Anil D'Silva