The Pentagon made it official yesterday: after three decades, Adm. Hyman G. Rickover is on his way out as czar of the nuclear Navy.

Unless his congressional supporters find a way to countermand President Reagan's freshly cut orders, Rickover will be retired early next year as director of the Navy's nuclear propulsion program and deputy assistant secretary of energy for naval reactors.

"The president feels that this is the proper time to plan and carry out an orderly transition," the Pentagon said in announcing the retirement of Rickover, who will be 82 in January.

"As secretary of the Navy," John F. Lehman Jr. told a press conference yesterday, "I have to worry about actuarial probabilities.

"I don't want to leave the implication that he's sacked," Lehman said of Rickover. "He's not." But the secretary, who had recommended replacing Rickover, said the time had come to give his jobs to someone younger.

In an apparent attempt to soften the blow, Reagan has asked Rickover to become his full-time adviser on nuclear science. Rickover has not said whether he will take that job, as a retired four-star admiral, or try to mobilize congressional supporters in an effort to stay on active duty in his current jobs.

Lehman said that when he and Defense Secretary Caspar W. Weinberger gave Rickover the official word about the president's decision yesterday, the admiral indicated he would rather stay on.

"He listened, and he was very attentive and polite and went away to consider" the president's offer of an advisory job, said Lehman when asked how Rickover took the news.

"There will not be a two-year renewal of his active-duty status" if Rickover should decline the White House job, Lehman said. The admiral has been kept on active duty with two-year extensions since 1962, but Lehman said he will be kept on active duty for only a few months beyond Jan. 1 to break in his successor.

It has been an open secret in the Pentagon that Weinberger and Lehman wanted to retire Rickover. The big question was whether Reagan would risk a political fuss by replacing Rickover, who, over 63 years of naval service, has become an institution.

"It was the same question earlier presidents faced in regard to replacing J. Edgar Hoover as head of the FBI," one defense official said. "Was it better to have him against you inside the tent or outside the tent?"

It was easier politically for Republican Reagan than for his predecessors to break the pattern, in part because the admiral had become identified with former Democratic president Jimmy Carter and in part because Rickover has outlasted many of the politicians who constituted his power base in Congress.

Also, the delays, cost overruns and giant size of the new Trident missile submarines caused some lawmakers to question whether Rickover has been in the same job too long. Pentagon civilian research chiefs complained that Rickover just built bigger rather than adopt advanced technology, such as smaller reactors for submarines.

But Rickover's conservative approach paid off in safety. Although two nuclear submarines have sunk, there is no evidence any of the power plants Rickover engineered in his long tenure ever broke down and endangered anyone, a record the civilian nuclear power industry has not matched.

Hailing this part of Rickover's record, Lehman said yesterday it amounted to "a zero defect in our government that can't be found in any other aspect of it."

Also, Rickover attracted many of the Navy's best and brightest to man the nation's fleet of attack and missile submarines. But he did not bring enough of them in to make up for those who quit, resulting in a chronic shortage that meant the nuclear-trained officers who remained had to work inordinately hard, including spending 18 of their first 20 years on sea duty.

"His personnel policies were irrational," said one Navy officer yesterday in charging that Rickover often rejected highly qualified men for submarine duty for whimsical reasons.

The admiral, who could scream at an officer or a contractor one moment and talk quietly and charmingly to a politician's wife the next as he showed her around one of his submarines, exasperated many of his civilian bosses at the Pentagon by attacking their policies before Congress.

For example, he assailed the Carter administration's settlements with submarine builders on who owed whom for work done.

Despite all that and more, however, the United States has at sea the best submarines in the world, thanks in large measure to Rickover insisting on doing things his way. "The nation owes an unending debt of gratitude to the admiral," the Pentagon said in yesterday's announcement, for "his contribution in leading the free world to superiority in nuclear propulsion and reactor safety."

One of his best friends and allies in Congress, Rep. Charles E. Bennett (D-Fla.), chairman of the House Armed Services seapower subcommittee, predicted last night that Rickover will retire quietly and gracefully. On Monday, Bennett will introduce a bill to name the newest Nimitz-class nuclear aircraft carrier after his friend. The Reagan administration will breathe a sigh of relief if "the kindly old gentleman"--Rickover's nickname among those in the Navy familiar with his screaming tantrums--settles for that.