TOKYO (AP) _ Stock prices plunged across the board on the Tokyo Stock Exchange today, and the dollar gained sharply against the Japanese yen.

The Nikkei Stock Average of 225 selected issues, a 166.72-point loser Monday, lost another 300.17 points, or 0.94 percent, closing at 31,985.60. On Thursday, it had closed at a record high of 32,452.49.

Dealers said the federal discount rate hike in the United States was the direct cause of the share prices' drop today, but concern about whether stock prices were overheated also held back buying.

Mike Morizumi, an analyst at Merrill Lynch's Tokyo office, called today's fall ''a technical correction.''

''Investors seem to have used the U.S. discount rate hike as an excuse to hold back from buying,'' he said. ''But the discount rate hike was well anticipated and its effects have already been discounted in share prices.

''Rather,'' he said, ''there was concern about constantly rising stock prices, and it was actually an ideal timing for the market to make the adjustment.''

In the foreign exchange market, the dollar opened at 127.00 yen and ranged between 126.92 and 127.20 yen before closing at 127.15 yen, up 1.15 yen from Monday's close. It had lost a total of 1.15 yen on the three previous trading days.

Exchange dealers said the dollar's firmness resulted mainly from expectations of rising U.S. interest rates.

Higher U.S. interest rates make dollar-denominated investments more attractive to foreign investors.

On Friday, the U.S. Federal Reserve raised its discount rate, its charge for loans to private financial institutions, from 6.5 percent to 7 percent out of concern over inflation in the American economy.