Five nuclear power plants, which help supply electricity to more than 13 million people along the East Coast, were ordered closed yesterday because their earthquake-proofing may be inadequate.

"A simple arithmetical error" in a computer formula used to design the plants seven years ago may have left their cooling system pipes only onesixth as strong as they should be, according to Harold R. Denton, director of the Office of Nuclear Reactor Regulation of the Nuclear Regulatory Commission.

The shutdown was ordered by the NRC staff.

If the pipes failed in an earth tremor, the main reactor could lose its coolant and the reactor's radioactive core could overheat and melt, releasing radiation into the environment, he said.

The plants affected, the only ones in which the faulty design was used, are Duquesne Power Co.'s Beaver Valley at Shippingport, Pa., near Pittsburgh; Virginia Electric and Power Co.'s Surry I and II at Gravel Neck, Va.; New York Power Authority's James Fitzpatrick plant at Scriba, N.Y., and the Maine Yankee plant, owned jointly by 11 unilities and run by Maine Yankee Atomic Power Co.

Denton said it would be "some months" before the five units could evaluate the extent to which they are affected by the design error and then order and install the necessary replacement pipe supports so that they could reopen. In the meantime, NRC Chairman Joseph Hendrie told a Senate hearing later in the day, the shutdown will cost consumers "an arm and a leg."

"We didn't even need a phone to hear the shrieks from the Energy Department over this thing," Hendrie said.

The Energy Department has been planning to ease the impact of reduced oil shipments from Iran by shifting power from nuclear plant areas to those where power plants are dependent upon imported oil. Now, Hendrie told the Senate energy conservation and regulation subcommittee, the country will have to burn an additional 200,000 barrels of oil each day to replace the electricity of the five nuclear units.

That, according to spokesmen for Beaver Valley, Maine Yankee and Fitzpatrick, will cost their customers about $400,000 more each day the plants are shut down. The sum will be passed along in fuel adjustment charges. A spokesman for Virginia Electric and Power Co said the cost for the Surry shutdown could not be calculated immediately.

"If allowed to stand, this will probably double the electric rates in the area served by the five plants, including Vepco's in Virginia," said Sen. J. Bennett Johnston Jr. (D-La.), chairman of the subcommittee. The 200,000 barrels of oil that will have to be burned, he said, "is equal to the savings to be achieved by closing all service stations nationwide on weekends."

Sen. James A. McClure (R.-Idaho) criticized Hendrie and the commission for having no alternative but shutdown in cases like this one. "It's typical of the tradition of keeping your hind end covered while someone else pays the price," he said.

Hendrie noted that no attempt to calculate the price had been made since the NRC's responsibility was safety without regard to economic and social costs.

The design error was discovered when engineers at Beaver Valley tried to figure out last December why some valves in the piping system were heavier than others, Denton told a news conference. They found that valve specifications under current computer formulas did not coincide with those under which the plant had been built.

Further checking, Denton said, revealed last week that the old computer formula, out of use since 1972, has subtracted horizontal stress calculations from vertical stress figures instead of adding them together. The formula, by Stone and Webster, a Boston-based nuclear design and construction firm, led to supports for the pipes that were in some cases onethird to one-sixth as strong as NRC regulations said they should be.

Although the NRC spot checks all safety systems before issuing operating licenses to nuclear power plants, the particular computer formula in use had never been checked for accuracy, Denton said. Stone and Webster abandoned the formula in 1972 but not necessarily because of this problem, he added.

Stone and Webster spokesman John Landis said the firm "learned better methods" of calculating stress and had not known of the problem when changing techniques. "We are not prepared to say yet if the design itelf needs changing," he said. "We only know that the nethod used then was not the one we would use today and does not give the same results." Only extensive testing will show whether the formula resulted in an inadequate design, he said.

Sen. Gary Hart (D-Colo.), who chairs another subcommittee with budget responsibility for the NRC, said he thought it "highly disturbing that the faulty design was discovered accidentally by [nuclear] industry representatives and not as the result of the NRC's regular inspection program."

That, he said, "raises serious questions as to whether there are other undiscovered design errors that, like this one, could knock out the safety systems of nuclear reactors in emergency situations."

The closures are the largest group to be shut down at once since 1975 when more than 20 plants were closed to undergo inspection for a possible safety problem. Denton said there had been 215 safety-related temporary closures at the initiative of the utilities in the last two years, 30 more after consultation with the NRC and a further 20 shutdowns ordered individually by the NRC staff.

Washington Post special correspondents Michael Guilfoil and Molly Murray contributed to this article .