By James Ramage 

The dollar rose against the yen and euro Thursday after data showed an expanding U.S. economy, which encouraged investors to wager on the U.S. currency ahead of inflation numbers due in Japan and the eurozone.

The dollar rose 0.3% to 109.27 yen. Earlier in the afternoon, it reached 109.47 yen, its highest level since Oct. 6.

The euro was down 0.2% to $1.2608, paring losses that had pushed the common currency to its lowest level in more than three weeks.

U.S. gross domestic product expanded at an annual rate of 3.5% in the third quarter, the Commerce Department reported, surpassing economists' forecasts of 3.1% growth. The dollar initially fell after the GDP report on worries that the gains were fueled by trade and government spending, not domestic demand. But as the day wore on, traders saw the report as a stepping stone to higher interest rates, which would spur demand for the dollar.

"Today's GDP number really justified the vote of confidence the Fed gave the U.S. economy," said Scott Smith, senior market analyst with Cambridge Mercantile Group. "On the medium to long-term basis, this will be a positive for the dollar."

On Wednesday, the Federal Reserve noted the U.S. economy is improving, particularly when it comes to inflation and the labor market. The Fed has said its plans to raise interest rates for the first time since the financial crisis are data-dependent.

Confirmation of a stronger U.S. economy persuaded investors that the dollar was a better bet than the euro and yen, particularly ahead of Friday's data. The Bank of Japan is set to release its latest three-year forecasts for economic growth and prices, which could offer clues about whether the central bank will tinker with its aggressive asset-buying program. The eurozone is expected to release October consumer-price data on Friday showing inflation remains at five-year lows.

Continued falling prices are likely to prompt the European Central Bank and the Bank of Japan to adopt further easing measures, which would weaken their respective currencies.

-- Write to James Ramage at james.ramage@wsj.com