The U.S. dollar trimmed losses on Thursday after data showed the the world's largest economy expanded faster than expected and inflation slowed in the second quarter.

The greenback came off lows against the surging yen and was last down 0.4% at 153.16. It was at 152.68 yen before the data. The dollar index was slightly down at 104.32 after the data. It was at 104.21 just before.

Advance estimates showed that gross domestic product grew at a 2.8% annualized rate last quarter. Economists polled by Reuters had forecast GDP rising at a 2.0% rate.

(Reporting by Gertrude Chavez-Dreyfuss; Editing by Alex Richardson)