After five sometimes stormy days, confirmation hearings for Alexander M. Haig Jr. ended yesterday with the secretary of state-designate telling supporters and critics that the "few clashes that occurred should not obscure the fact, either among our own people or the nations of the world, that we all share the same values and goals."

The Senate Foreign Relations Committee, which has been holding the hearings, referred to by Chairman Charles H. Percy (R-Ill.) as by far the longest for any nominee to the State Department post, is to vote today on Haig's nomination. It will then go to the full Senate for a vote.

Although approval in the committee and the Senate is considered assured, Percy acknowledged yesterday that it is unlikely that Haig will be confirmed Tuesday, when Ronald Reagan becomes president, something that had been a goal of the Republican-dominated committee and Senate.

Percy said he hopes to bring the nomination to the floor of the Senate, along with the rest of the 13-member Reagan Cabinet, on Inauguration Day, but that, as a practical matter, there won't be time in the brief session that day to get action on all nominees.

Sen. William Proxmire (D-Wis.) already has demanded that a recorded vote be taken on each Cabinet member. Haig, as the most controversial Reagan appointee, is almost certain to draw fire from some critics on the Senate floor, and Republican strategy appears to be to get as many of the non-controversial appointees in place as possible Tuesday and accept a few day's delay on the retired general and former key aide to Henry A. Kissinger and Richard M. Nixon.

Summing up his appearance before the panel, Haig told the lawmakers that it had been "an extraordinary experience . . . a special education." There were "some sharp exchanges and some sincerely held differences" spoken in candor, he said.

"We all share the same objective: a strong America working with honor and grace," he said, considering the experience of the past decade, the most important lesson of the hearings is that Congress and the executive branch "must talk, think and act together."

At the close, Haig and many of his critics among the Democratic minority agreed with his assessment that "these hearings represent what is great about our nation." Although Haig won virtually unamimous bipartisan praise as an impressive witness, it is not at all clear how many of the Democrats share Haig's assertion that "we all share the same values."

Of the eight Democrats on the committee, only Sen. Edward Zorinsky (D-Neb.) seemed to signal a definite affirmation vote yesterday. Sen. Joseph R. Biden Jr. (D-Del.) told Haig, "You've created more of a problem for me than any nominee that's ever come before me."

Sen. Alan Cranston (D-Calif.) told Haig that he was now "leaning" toward a yes vote, although he had been leaning in the other direction before the hearings started, and that "it is apparent" that Haig will be confirmed.

Cranston coupled his faint praise of Haig, however, with a summation of the "concerns" the nomination posed for some on the panel.

"In your long career," Cranston said, "there does not appear to be a position you have held that has been a real test of your policymaking capability, your capacity for original and inovative solutions, and your ability to distinguish between shades of gray."

Cranston worried aloud about what he called Haig's tendency to see things in stark "right or wrong, we and they" terms, and questioned his respect for Congress as an institution.

The senator asked if it was possible to have been surrounded by the abuses of the Nixon White House and emerge without a blemish, and added another dollop of "concerns" that Haig refused to pass moral judgment on those activities until pressed by the committee.

For the most part, however, yesterday's session was marked by cordiality, as though the spector of Watergate, which had been hanging over the hearings from the start but only broke out into the open Tuesday, had now passed.

Most of yesterday's questioning centered on foreign policy, and added to the rather lengthy record Haig and the panel have laid out already in this field.

Among the key points:

Haig said he supported the Carter administration's recent decision to resume military aid to El Salvador "and would even like to see it more extensive."

He said he would not recommend opening relations with Marxist-ruled Angola as long at there are "18,000 to 20,000 Cuban mercenaries" in that African country.

While voicing strong support for Israel, Haig warned that the United States must make sure Egyptian President Anwar Sadat "doesn't fall because of the failure of this country to help meet his needs or to make sure there is value to his relationship with us. I'm not sure we've been as responsive as we should."

Although the Reagan administration will welcome the observations of former secretary of state Kissinger after his recent private trip through the Middle East, Haig's former boss was "not enfranchised" to represent the Reagan administration.

Haig also held forth at length yesterday on perhaps his favorite subject, the Soviet Union and the problems it poses for this country.

Haig said that improvement in East-West relations, while a desirable objective, has got to be preceded by "some adherence to the international rule of law."

The issue of "illegal Soviet activity, whether direct or through proxies, is a matter we must view with greater gravity than we have heretofore," he said.

Those rules, he said, "cannot include the use of Soviet forces in the developing world, the suppression of free people by Soviet military power, the training, funding, manning and equipping of so-called forces of liberation or terrorist groups around the world."

Haig warned that Soviet calculations about the West will never be influenced by what the West says but only by western actions and preparedness. iFrom recent Soviet conduct, he said, including risks Moscow is taking, "You can only conclude that they are in an expansionist, imperialistic stage." "

Under questioning, Haig also advanced a theme central to his thinking about the Soviets.

Haig said he believes "Marxist-Leninist policies to be in a position of historic failure" in terms of "agriculture, economy, the ability to satisfy the public sector, a growing dependence on outside energy and fundamental shifts in the demographic character" of the Soviet Union. "All of this suggests to me that, in a historical sense, we are witnessing the unraveling an demise of Marxism-Leninism as a wave of the future."

But "my corresponding concern," Haig said, "is that for totalitarian systems of that kind, when faced with that failure and armed so heavily, it raises the temptation for an incumbent leader to engage in external diversions so they can insure their incumbency. So far a decade or more, we are in an extremely dangerous period. We cannot take comfort in Marxist-Leninist failure. We've got to be alert and postured" to handle military diversions.