TOKYO - Toyota Motor Corp reported a surprise quarterly profit and slashed its annual loss forecast by more than half as sales and cost cutting beat its forecasts, putting it on track to follow Japanese rivals into the black next year.

Toyota, the world's biggest carmaker by sales, wrapped up an earnings season dominated by rosier projections from Japanese automakers as they squeeze out savings and boost manufacturing efficiencies to offset the damaging rise in the yen.

The industry has also gotten a sales boost from government-backed incentives from Germany to China and Japan, aimed at igniting demand through the worst economic crisis in generations.

But with the outlook for demand uncertain at best as such stimulus programs begin to run out, Toyota is looking to eliminate more spending, announcing its exit from Formula One racing on Wednesday to put its annual budget of around $300 million to better use.

Toyota now expects an operating loss of 350 billion yen ($3.9 billion) for the year to March 31, closer to an average projection of a 293 billion yen loss in a poll of 22 analysts by Thomson Reuters I/B/E/S.

It expects a net loss of 200 billion yen instead of a loss of 450 billion yen.

For the July-September quarter, the maker of the Prius hybrid car reported an operating profit of 58.0 billion yen, down 66 percent from a year earlier but beating an average estimate of a loss of 63 billion yen from five analysts.

Its net profit fell 84 percent to 21.84 billion yen, while revenue dropped 24 percent to 4.54 trillion yen.

For graphics on Toyota's earnings please click: http://graphics.thomsonreuters.com/119/JP_TYTA1109.gif

Toyota, until two years ago the world's most profitable automaker, had been the only top Japanese carmaker expected to post a loss in the latest quarter, weighed down by severe overcapacity after years of building new factories during its boom years before the financial crisis hit.

Struggling U.S. rival Ford Motor Co also reported a quarterly profit this week, defying Wall Street estimates as it seized market share from rivals General Motors Co and Chrysler as they emerged from bankruptcy.

The stronger yen, which eats into profits made abroad, has dealt a double-blow because Toyota exports more than half of its vehicles built in Japan.

WORK ON CHINA

The second-quarter earnings mark a huge improvement from the previous quarter's 194.9 billion yen loss, as Toyota gradually ramped up production in Japan, where demand for its Prius and other hybrid cars has shot up thanks to generous tax incentives.

But with sales in the key U.S. market still far below their peak, Toyota is aiming to boost manufacturing efficiencies to be able to break even using just 70 percent of its parent-only output capacity.

Analysts expect capacity utilization to improve regardless, with Toyota exiting a 400,000 units-a-year factory in California that it had held jointly with GM.

On Wednesday, Japanese rival Nissan Motor Co <7201.T> revised its annual outlook to a profit from a loss as soaring sales in China helped it grab a bigger slice of the fast-growing market.

While red-hot demand in China has been a boon for all brands, Toyota's sales growth there has lagged the overall market's due to a dearth of smaller models that qualify for Beijing's tax incentives introduced this year.

To better cater to local demand, Toyota is looking to beef up its research and development functions in China.

The Nikkei business daily reported on Thursday that Toyota planned to spend 30-40 billion yen ($330-$440 million) to build an R&D center in China as early as next year. Toyota said it had not made any decision, although it has been considering various options in view of local consumer and government needs.

Shares of Toyota lost 2.7 percent during its second quarter, underperforming the main Nikkei average <.N225>, which rose 1.8 percent.

Before the results were announced, Toyota ended down 0.8 percent at 3,580 yen, against the Nikkei's 1.3 percent fall. ($1=90.77 Yen)

(Additional reporting by Taiga Uranaka)