The Social Security old-age trust fund, which two years ago was forced to borrow money to stave off insolvency, has estimated it will have enough cash on hand this year so that it can begin repaying its loans at least a year before it had been expected it could.

Health and Human Services Secretary Margaret M. Heckler wrote to Treasury Secretary Donald T. Regan Jan. 22, telling him that the Old Age and Survivors Insurance (OASI) Trust Fund now was healthy enough to make initial repayments of $1.824 billion to the Hospital Insurance Trust fund and $2.54 billion to the Disability Insurance Trust Fund.

The OASI fund had borrowed $17.5 billion from those funds in November and December 1982, to guarantee that retirement checks would continue to go out to 32 million recipients.

The repayments mark a significant, if not dramatic, turnaround for the OASI, the largest and financially weakest of the funds in the Social Security system. Officials attributed the change to legislation that Congress enacted.

The financial rescue plan, which President Reagan signed on April 20, 1983, included increases in employer and employe payroll taxes. The package also required the OASI to start making payments on its loans whenever, at the end of a year, it looked as if the system would take in 15 percent more than it would need to cover its expenses for the coming year.

That was what happened at the end of 1984, far sooner than anyone expected.

"This indicates that the Social Security system is in better shape than people thought it was," said Robert J. Myers, former chief actuary for the Social Security Administration. "You can't say this solves all the problems forever, but it shows the system is continuing to get better."