Aug 4 (Reuters) - Japanese stocks gained on Thursday despite an afternoon plunge in Toyota Motor Corp as the country's biggest automaker posted a large drop in quarterly earnings.

Japan's Nikkei share average closed up 0.69% at 27,932.20 after briefly breaking through the 28,000 barrier, which it hasn't finished above since June 9.

The broader TOPIX index was more muted, closing flat at 1930.73 after bouncing between positive and negative territory throughout the day.

Toyota fell 3.45% after it released its earnings report, which showed a 42% year-on-year decline in operating profit, before paring losses slightly to close down 2.99%.

"I can't say the results were good, but they weren't so bad as to be a surprise," said a market participant at a domestic securities firm.

"We'd like to analyse Toyota's results," Kyoko Amemiya of Amemiya Research Institute said ahead of the release. "Toyota's performance could indicate the direction of the overall market."

Rival automaker Subaru Corp was the best performer on the Nikkei on Thursday, gaining 8.48% after a positive earnings report and optimistic forecasts for future sales in the United States.

Of the Nikkei's 225 components, 109 made gains, 113 made losses, and three were flat.

Casio Computer Co Ltd gained the most after Subaru, adding 6.29% after forecasting stronger profits for its current financial year.

Other technology companies helped the Nikkei after the Philadelphia SE Semiconductor Index gained 2.65% overnight. Sumitomo Electric Industries was up 5.96% and Tokyo Electron Ltd added 3.1%.

The worst performer was Z Holdings Corp, the operator of Yahoo Japan and Line, which fell 10.99% after releasing its earnings.

Investors also eyed video game maker Nintendo after it announced a year-on-year slump in Switch console sales, but the stock gained 0.41%. The company's unit sales forecast for the current fiscal year remains unchanged. (Reporting by Sam Byford and Tokyo markets team; Editing by Shailesh Kuber)