By Fanny Liu and Eva Dou 

TAIPEI--Taiwan's economy gathered pace in the second quarter, as electronics exports rose, companies stepped up investments and consumers continued to spend.

In the three months ended June 30, Taiwan's gross domestic product rose 3.9% from the same period a year earlier and was up 1.5% from the previous quarter, a preliminary estimate released by the Directorate General of Budget, Accounting and Statistics showed on Thursday.

The year-over-year expansion was above the government's forecast of 2.8%. It was also higher than the median 3.1% increase forecast by 10 economists in a survey by The Wall Street Journal, and stronger than the 3.1% expansion in the previous quarter.

Taiwanese manufacturers are supplying key components such as microprocessors and camera lenses to global electronics brands, including Apple Inc. As tech titans are preparing for new product releases and more tourists visit Taiwan, the island's exports rose 2.9% in the second quarter. Exports gained less than 1% in the first quarter.

As prospects in exports brightened, capital formation--which includes government and private-sector investment in fixed assets and changes in inventories--rose 6.9% in the second quarter from a year earlier, after contracting 0.5% in the first quarter.

Lifted by a rising stock market and an increase in jobs, private consumption grew 2.6% year-to-year in the second quarter, compared with a 2.7% rise in the first quarter.

As the latest iPhones and other electronic devices are slated for launch in the second half, and companies are upgrading their computers after Microsoft Corp. phased out its aging operating system, manufacturers and economists expect exports to rise even more quickly in the third and fourth quarter.

But some economists said that as Taiwan's exports are more tied to gadget releases now, the overall economy could slow again if electronic demand ebbs.

"Taiwan's comprehensive and competitive supply chain of smartphones and tablets will continue to boost exports at least through the first half of 2015," said Standard Chartered economist Tony Phoo.

Barclays Research economist Waiho Leong said the data shows growth momentum is gaining and that Taiwan is benefiting from an improving investment appetite in the U.S. "That means it is benefiting from more handset launches as well as stronger orders for information technology equipment," Mr. Leong said.

Economic recoveries in the U.S. and China, Taiwan's two biggest export markets, are gathering steam, boding well for Taiwan's exports. The U.S. economy rebounded in the second quarter and the jobless rate declined further, although inflation remained low. China's growth also accelerated slightly in the second quarter.

Taiwan's export orders, an early indicator of actual exports, were at their strongest in 17 months in June. Industrial production in June was up 8.6% on year, above expectations, led by double-digit gains in semiconductor output, which some analysts put down to increased Taiwanese supply to Apple. The island's manufacturing activity, measured by purchasing managers' indexes, has been expanding steadily.

The government had earlier forecast the export-dependent economy to expand 3% this year, the best in three years--but still way below the plus-5% expansions it regularly logged before the global financial crisis.

Largan Precision Co., which supplies camera lenses for iPhones and other smartphones, told investors earlier this month that business would continue to grow on the back of approaching product launches. "Orders were better in July than in June, and August will be better still," the company's chief executive, Adam Lin, said.

At Delta Electronics, another iPhone component supplier, chairman Yancey Hai said several factors pointed to a brighter second half than last year. "We have high hopes for the smartphone business. Our PC business should also be better than last year because Microsoft's discontinuation of support for Windows XP will encourage purchases of new computers," Mr. Hai added.

The island's large personal-computer manufacturing industry is also stabilizing, after steep contraction in the sector weighed on the Taiwan economy in the past two years.

Write to Eva Dou at eva.dou@wsj.com

Microsoft (NASDAQ:MSFT)
Historical Stock Chart
From Mar 2024 to Apr 2024 Click Here for more Microsoft Charts.
Microsoft (NASDAQ:MSFT)
Historical Stock Chart
From Apr 2023 to Apr 2024 Click Here for more Microsoft Charts.