President Reagan last night refused to rule out entirely either tax increases or some "stretchout" of his defense buildup to reduce projected deficits over the next few years, saying, "I will look at everything."

In a nationally televised news conference, the president left himself the greatest possible room for deficit-reducing steps as he goes into the final round of decisions this week and next on the fiscal 1984 budget he will submit to Congress later this month.

Reagan said no decisions have been made on the budget. He defended his military buildup, but at the same time indicated he might be willing to spread it out, as some leading members of Congress have urged, as long as that did not interfere with defense production lines or jeopardize national security.

It was learned yesterday that Pentagon officials already are studying how they might scale down next year's budget by $8 billion to $11 billion. Details, Page A9.

Reagan also has been urged by Cabinet members and leading senators of his party to consider a tax increase as one way to bring down deficits. He said last night that "a tax is the wrong thing to do when you're trying to come out of a recession."

But when asked his view of a possible speedup of Social Security tax increases already scheduled to take effect in 1984, 1986 and 1990--one alternative that is under discussion to shore up the giant benefit system--Reagan did not flatly rule it out.

"There is a limit with regard to how far you can go on the tax, and the limit is caused by the fact that a big proportion of our working people today are paying a greater tax in Social Security than they are in income tax," Reagan said. Still, he added: "We will look at that."

The president adamantly refused, however, to inject himself into the final deliberations of the bipartisan commission he named to make recommendations on Social Security after his proposed benefit cuts were shot down in Congress last year.

The commission has been deadlocked and must make its report in nine days.

Some members have said it will not be able to make a single set of recommendations unless Reagan steps in to help fashion a mix of tax increases and benefit curtailments.

"I believe that for me, to now impose myself, I don't care how much they ask for it, for me to impose myself on the commission and say, 'Hey, fellows, this is the way I want you to go,' I would then stand back and cock my ear and wait for the loud outcry from Capitol Hill and the same old political football would be seen going up in the air like a punt on third down," the president said.

"If they [the commission] cannot come to a conclusion, then let them submit to us the things that they have proposed and where there are . . . differences between them, and then it will be up to us," he added.

Five leading members of the commission met behind closed doors yesterday with White House Chief of Staff James A. Baker III in an effort to resolve their differences.

In general, the Democrats want to rely more on tax increases to shore up the system; Republicans want to rely more on benefit cuts. They were said to be "closer" to a compromise than before, but not there yet.

Those who met with Baker included commission chairman Alan Greenspan, Senate Finance Committee Chairman Robert J. Dole (R-Kan.), Sen. Daniel P. Moynihan (D-N.Y.), House Ways and Means Committee member Rep. Barber B. Conable Jr. (R-N.Y.), and Robert M. Ball, former commissioner of the Social Security Administration.

On the budget issues in his news conference last night, Reagan suggested both a willingness to consult and compromise with Congress and a determination not to be pushed around by Democrats.

He opened the 34-minute news conference with a statement that he is looking forward to working with Congress on budget issues. But in response to a question, Reagan also jabbed at House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) on the subject of spending cuts.

Reagan said he had heard O'Neill "on the tube" say that the president would have difficulty moving an anticipated $30 billion in domestic budget cuts through Congress for fiscal 1984.

"And I thought to myself, I assume that from now on he will have nothing to say about us being responsible for the deficit, since he has made it plain that he will refuse to approve any reductions in spending," Reagan said.

"Now, you've got a deficit; you want to cut it down; obviously you've got to spend less, and I hope that he'll rethink his position on that."

In his first formal news conference this year and his 15th since taking office, the president noted the growing size of deficit projections he has received. On Monday, his economic advisers told him that, without offsetting actions, the 1984 budget deficit would be more than $215 billion and would reach about $280 billion by 1988.

His economic advisers have expressed fear that, without fundamental policy shifts, Reagan would be unable to bring down the deficits that threaten an economic recovery. And last night the president expressed concern that the deficits "not become a roadblock on the path to long-term economic recovery," but offered no specifics on how he would get them under control over the long term.

While he asked reporters to hold off on questions about the budget, such queries dominated the session, and Reagan was responsive to the extent that he seemed to be holding open the door to new options in the final week of decisions on the fiscal 1984 document.

His comment to this effect was unusual in that the budget has been under preparation virtually since Election Day last November, and Reagan now seems willing to talk about new alternatives with just a week remaining before he must send the new budget to the government printers.

His comment, repeated several times, that "I will look at everything" appeared to be a signal to restive Republicans on Capitol Hill that he has not foreclosed some modifications in his expensive Pentagon buildup.

Asked whether he would accept some kind of stretchout of the administration's plan to add $116 billion over five years to the defense budget, Reagan appeared receptive to the idea if it does not interfere with his national security goals.

"We have looked at such things, and we will continue to look," the president said of a defense stretchout. He appeared willing to consider it "if there can be a stretchout that does not shut down your, part of your industry.

"One of the problems, a stretchout sounds as if it might not be too serious, but you have to remember, we don't have the military-industrial complex that we once had," he said. "Assembly lines have to be put together and started up again to meet the demand for the weapon systems."

The president said, as he has before, that he has already compromised with Congress by forgoing $41 billion in defense outlays envisioned in his original defense budget goals, but Reagan also said he wouldn't hesitate to cut further if that was recommended by a group of private businessmen looking for management savings in the military.

"So if it can be cut, it will be cut," he said. "But the priority must be, not if it means reducing our ability below the level at which we can declare ourselves safe."

Asked whether he would consider a tax increase as a deficit-fighting option, Reagan said it is "a common and accepted fact that increasing taxes is not a way out of the recession." But he did not apply this caveat to a possible increase in Social Security taxes.

Reagan maintained that about half the big deficits he faces are caused by the recession, and that about half are "structural" and built in by past legislation. He said so-called entitlement programs are contributing most to the rise in federal spending, and said he would seek more entitlement program cuts from Congress.

Asked when he would make and announce a decision about his reelection plans, Reagan said only, "Sometime this year."

Reagan took advantage of a question on the economy to point to signs of improvement, including a 6-percent increase in retail sales over last year; he said "building of houses is up 66 percent over last year" and "sale of new homes is up 47 percent over last year."

"The economy is getting better, not worse," he maintained.

He noted that to combat unemployment "we have twice extended the unemployment insurance payments," and he has signed a trade export bill as well as a $1 billion job-training initiative.

Reagan suggested that the disturbances in Miami recently were not related to hard times. "In the Great Depression, nothing like that ever took place when the situation was much worse . . . ," he said.