* Q2 EPS $0.46 vs $0.06 year-ago

* Q2 sales up 13 pct

* Comp sales up 8 pct

* Shares rise 7 pct

CarMax Inc (KMX.N), the largest retailer of used cars in the United States, posted a higher quarterly profit, helped by improving customer traffic trends.

The government's CARS, or cash for clunkers, program resulted in a spike in traffic in late July and August, CEO Tom Folliard said in a statement.

For the second quarter ended Aug. 31, net income rose more than seven-fold to $103.0 million, or 46 cents a share, from $14 million, or 6 cents a share, a year ago.

The results included a gain of 10 cents a share from favorable adjustments from CarMax Auto Finance (CAF).

Sales rose 13 percent to $2.08 billion.

Analysts were expecting earnings of 18 cents a share, before special items, on revenue of $1.77 billion, according to Reuters Estimates.

Comparable store used-unit sales rose 8 percent, a sequential improvement from the first-quarter decline of 17 percent.

CarMax, which operates 100 used-car superstores in the United States, said total used-unit sales rose 10 percent in the second quarter. Wholesale unit sales increased 5 percent.

While customer traffic in the second quarter remained slightly below the prior year level, it has steadily strengthened throughout the first half of the current fiscal year, it said.

Shares of the Richmond, Virginia-based company were up 7 percent at $20.70 before the bell. They closed at $19.33 Tuesday on the New York Stock Exchange. (Reporting by A.Ananthalakshmi in Bangalore; Editing by Vinu Pilakkott)