President Reagan decided yesterday to trim his planned increases in defense spending outlays for the next three fiscal years by $13 billion, a figure that falls considerably short of what Office of Management and Budget Director David A. Stockman recommended and which means new, larger cuts in domestic programs.

Last month, presidential chief of staff James A. Baker III said that the president was "prepared" to cut defense outlays for 1983 and 1984 by $20 billion to $30 billion, and White House spokesmen have reiterated those figures on a number of occasions since.

But yesterday, White House communications director David Gergen announced that the president had decided on cuts of $2 billion in defense outlays for 1982, $5 billion in 1983, and $6 billion in 1984. These reductions in planned expenditures will still permit substantial increases in defense spending in each of those years.

The president also decided not to make any reductions in defense spending plans for fiscal years 1985 and 1986, Gergen said.

"I appreciate the spirit in which you have reached this agreement," Reagan said in a memo addressed to Stockman and Defense Secretary Caspar W. Weinberger, "and firmly believe that we have struck the balance necessary to assure both an increasingly strong defense and the economic health on which defense and well-being depend."

Copies of the president's memo, on Camp David letterhead stationery, were handed to reporters late yesterday afternoon at a hastily called briefing in which the new figures were disclosed.

The unusual, late Saturday announcement apparently was timed to assure that the news of the president's decisions would reach Wall Street, where analysts have been skeptical about the prospects of the Reagan economic policies, well before the stock markets open Monday.

The defense spending reductions will provide only a small share of the new round of overall reductions that Reagan plans to announce as part of his effort to hold the 1982 deficit in check and to balance the federal budget by 1984.

Gergen said the president is still operating under the "working assumption" that he will be able to reduce overall spending for fiscal 1983 and 1984 by between $70 billion and $75 billion. Yesterday's announcement, Gergen said, constitutes the defense portion of those additional cutbacks. The substantial remainder of the reductions will come out of domestic programs.

Gergen also read to reporters a statement from the president saying that "based upon initial analyses," Weinberger yesterday had reported that cuts in the total obligational authority of $21 billion to $22 billion would be necessary over the next three fiscal years to achieve the reductions in outlays that he had ordered. Total obligational authority includes money that is committed for future programs as well as funds that will actually be spent within a specified year.

In his campaign for the presidency, Reagan had pledged to increase defense spending by 7 percent a year for the next five years. His revised figures will constitute an increase of at least 7 percent a year, after making adjustments for the effect of inflation, in the 1981 budget proposed by President Carter. That budget called for outlays of $171 billion.

Weinberger had argued in administration councils that the 7 percent increases should be based upon Reagan's significantly higher 1982 figure, not Carter's 1981 figure. Gergen said he was not yet prepared to say whether the latest Reagan figures will also be 7 percent higher than the 1982 base year projection.

The White House went to great lengths to emphasize the collegiality of the latest round of defense cuts. Along with the president's statement which referred to the resulting "agreement" between Weinberger and Stockman in each of its three sentences, reporters were also handed statements from Weinberger and Stockman, in which each heaped praise and gratitude upon the other.

In fact, the infighting between the two was strong and at times heated. Weinberger appears to have emerged with primarily just what administration officials say he was privately willing to accept in defense cuts. Stockman had recommended significantly larger cuts in defense spending--in the $20 billion to $30 billion range that presidential chief of staff Baker had earlier talked about, according to administration sources.

Weinberger said in his statement that the new five-year levels for defense spending are "a very fair and appropriate reconciliation of the twin needs to increase our defensive strengths in a planned orderly way for the next several years, and the need to reduce our deficits to enable the president to meet his vitally needed goal of the budget balance by the end of the fiscal year 1984."

Stockman said: "The president's decision is an important step in our intensifying effort to reduce the deficit and begin identifying future year budget savings. I am pleased that the Defense Department was able to identify such savings without risk to essential elements of the defense rebuilding program."

Gergen said that the president believes his new defense figures demonstrate his "continuing commitment" to his two goals: "a strong economy and a strong national defense."

He added that Reagan also believes that "his overall commitment to shrink the size of government will be a reassuring signal to the stock market."