President Reagan yesterday put the country's money behind his long-standing pledge to "rebuild the nation's defenses" by proposing a $169.5 billion boost in military spending beyond levels already planned over the next five years while proposing across-the-board budget cuts in all other areas of federal spending.

The president, in the "Program for Economic Recovery" unveiled yesterday, said strenghtening U.S. military power is one of only two "overriding priorities" that guided his decisions in cutting about $41.4 billion from other agencies while increasing the Pentagon budget even faster than the Carter administration proposed. Reagan said those cuts must be made to get money to increase the defense budget. The other priority is to ensure that the "social safety net" is maintained for the nation's poor, elderly or disabled.

Despite hard times at home, the administration argued that "the growth of Soviet military power over the past decade threatens to undermine our ability to deter an armed attack on our interests during the 1980s." Not only must U.S. readiness be increased to deter such an attack, the report said, but U.S. ability to "prevail" in response to aggression must be improved, in case deterrence fails.

The presidential report contended that Moscow had invested $300 billion more than the United States in defense since the late 1960s. "The consequences of permitting a growing divergence of military power to persist during the 1980s are so fraught with danger" that a major five-year effort is required, the report said.

In effect, the administration is proposing to turn back the clock to a period when defense traditionally received a larger share of the federal budget. Statistics provided yesterday show defense took 43.8 percent of federal spending in 1962; it dropped to 24.1 in 1981. The Reagan plan is to boost it to 32.4 percent by 1984.

Though the Pentagon's budget is only one with any significant increases, there were no details yesterday about what is in it because the vast bulk of the report dealt with how much the government is economizing.

The figures did show, however, that the administration plans to ask Congress for an extra $1.3 billion for defense in the current fiscal year (1981), $7.2 billion extra in fiscal 1982, $20.7 billion in '83, $27 billion in '84, and then whopping add-ons of $50.2 billion in '85 and $63.1 bilion in '86 as the bills come due on expensive new planes, ships and tanks. All of these figures would be in addition to the previous five-year plan laid out by the Carter administration, which called for defense spending to grow from roughly $158 billion this year to $293 billion in 1986.

The Pentagon has promised some details on what this money will buy when Defense Secretary Casper W. Weinberger goes to Congress with the program next week.

Meanwhile, the available figures tell far less than the whole story about the sweeping increases in store for defnse, about how to compare them with the previous administration and about how the Pentagon might also contribute to some savings.

While the add-ons for fiscal '81 and '82 may appear modest in comparsion to the overall defense budget, those figures represent only increases in actual spending. But Weinberger will ask for authority to commit the Pentagon to contracts for vastly larger amounts of money to buy weapons that take years to produce.

Thus, while the Pentagon will ask for $1.3 billion and $7.2 billion more in spending this year and next, officials say it will request authority to obligate roughly $6 billion additonal this year and $26 billion next year beyond the $171 billion and $196 billion in authority for those years requested by Carter.

Pentagon officials also acknowledged yesterday that the figures in the president's report showing the inceases in annual spending cannot be compared directly to the Carter budgets because the Reagan administration first applied its own inflation forecast to the Carter plan and made other modifications.

The Pentagon is being called on to make some off-setting savings in other programs, which the White House says will amount to about $300 million this year, $2.9 billion next year annually by 1986. Thus, officials acknowledged, the increases shown in the report really are not quite as large as they appear.

Official said no bases would be closed this year or next as part of those savings, but that civilian defense workers would get only a 4.8 percent incease as opposed to 5.5 percent proposed by Carter. Other economies are supposed to materialize by greater use of multiyear contracts and more competitive bidding.