The White House and congressional conferees agreed yesterday on a retirement system for new federal workers that would save taxpayers about $2 billion a year, create a tax-deferred savings plan to raise employes' retirement income and deny cost-of-living increases to retirees under 62.

White House officials, who had sought deeper cuts in the $25 billion-a-year program, decided yesterday to go along with the major elements in a House-Senate compromise they had turned down two weeks ago.

Under the plan, nearly 400,000 federal workers hired since 1984 would be covered by a new three-part retirement system much like those widely used in private industry. All new federal workers would be covered by the system, in which Social Security benefits would be supplemented by a government pension and a tax-deferred savings plan.

"The president has approved the agreement on the retirement bill this morning," said Constance J. Horner, director of the Office of Personnel Management. "The bill is a terrific outcome, fair to both taxpayers and employes."

Sen. Ted Stevens (R-Alaska), a main sponsor, called it a "state-of-the-art" retirement plan.

The system differs from the current Civil Service Retirement System in three major ways:

*The minimum retirement age would be raised gradually from the current 55 to 57 after 30 years of service.

*Automatic cost-of-living increases would be eliminated for retirees 61 or younger and reduced to the Consumer Price Index minus 1 percentage point for retirees 62 and older. The current system entitles all retirees to the full cost-of-living increase.

*Employe costs would be higher if employes take full advantage of the savings plan. Under the new system, employes would contribute about the same percentage of pay toward retirement benefits as those under the current system, but they also would have to participate in the savings plan to qualify for the maximum government contribution to the pension and savings plans, estimated at 22 1/2 percent for the typical employe. Government cost for the current system is about 25 percent of payroll.

Under the new system, middle-level federal workers retiring at 62 in the year 2030 -- those earning about $30,000 today -- would be guaranteed a retirement income equal to about half their salaries if they contributed nothing to the savings plan, or about two-thirds of their salaries if they did contribute.

Under the current system, a federal worker with the same salary and length of service will receive slightly more than half of his or her final annual salary.

Yesterday's agreement ends a three-year struggle that began when Social Security bailout legislation brought newly hired federal workers into the Social Security system for the first time and required the government to devise a supplemental pension plan for them.

In the first "tier" of the House-Senate compromise, workers would receive Social Security benefits. Civil service employes who retire before they are eligible for Social Security would receive a special Social Security supplement until they reach the official retirement age of 62. Workers with substantial outside income, however, would not get the supplement.

The second tier is a pension that increases with length of government service. The size of pensions under the plan could be calculated by multiplying 1 percent times the length of service times employes' average annual salary during the three highest-paid consecutive years. If a worker waited until age 62 to retire, his or her pension would be be 0.1 percent higher for each year of work.

The third tier is a tax-deferred savings plan to which employes could voluntarily contribute up to 10 percent of their salaries. The government automatically would contribute a sum equal to 1 percent of an employe's salary to the plan, matching the first 3 percent of the employe's contribution dollar for dollar and the next 2 percent 50 cents on the dollar for a maximum contribution of 5 percent. Neither the contribution nor the earnings would be taxed until they were withdrawn. Employes could invest their savings in government securities, fixed-income securities such as bonds or certificates of deposit, and stocks.

Employes covered by the current Civil Service Retirement System would be able to switch to the new three-tier plan. Longtime employes who elected to stay in the current system would be able to join the tax-deferred savings plan without any government contribution.

Yesterday's compromise falls far short of administration goals. The President's Private Sector Survey on Cost Control, or Grace Commission, targeted civil service retirement as one of the budget's most wasteful areas, and the administration sought to make significant cuts.

The president settled for a big change in the cost-of-living formulas and a slight increase in retirement age. Senate sources estimate that the new system would save the taxpayers $42 million next year, rising to $2.67 billion in 1991.

Federal employes would keep their early retirement option and get the special Social Security supplement, while benefiting from a higher government contribution than the admininstration proposed.

The compromise faces House and Senate approval before going to the president for his signature.

The new system would remove newly hired District of Columbia employes from the federal retirement program starting in October 1987, under an agreement that gives the District an extra year to set up its own system. Current District employes in the federal system would remain in it.