William J. Baroody Sr., 64 a former president of the American Enterprise Institute, a noted conservative and an informal adviser to Presidents Nixon and Ford, died at Alexandria Hospital on Monday following a heart attack. He had cancer.

Mr. Baroody joined the American Enterprise Association, now the AEI, in 1954 as executive vice president. He became president in 1962 and held that post until 1978, when he retired. He was succeeded by one of his sons, William J. Jr., a former aide in the Ford White House.

Throughout his career, Mr. Baroody espoused the conservative view on many issues and the cause of many leading Republican leaders. He was regarded as principal adviser of Sen. Barry Goldwater (R. Ariz.) when the latter was the GOP presidential candidate in 1964. He also was a friend and confidante to Nixon, Ford and others.

There was a time when the American Enterprise Institute was regarded by critics as an organization devoted largely to the conservative interests of business. In 1964, the Internal Revenue Service investigated its connections with the Goldwater campaign to see if it had violated the conditions under which it retained its tax-exempt status. The result of the investigation was that the AEI was a nonpartisan, nonprofit "think tank."

It is a measure of Mr. Baroody's success as head of the organization that the AEI now is highly regarded by persons of all political persuasions for the quality of its reports, even if its conclusions often come down on the conservative side of things. Those who have been associated with the AEI over the years include Arthur Burns, former chairman of the Federal Reserve, Melvin Laird, former secretary of defense, and Richard Neuhaus, liberal Democrat.

Under Mr. Baroody's leadership, the AEI grew from an organization that relied principally on large corporations for its budget of about $80,000 a year to a group that now receives much of its funding from major foundations and has an annual budget of about $8 million a year.

Apart from his work at AEI, where he became chairman of the development committee after he stepped down as president, Mr. Baroody was a founder and member of the board of the Center for Strategic and International Studies at Georgetown University. He also was a member of the U.S. Catholic Bishops' Advisory council, the chairman of the board of the Woodrow Wilson International Center for Scholars, a member of the board of consultants at the National War College, and member of the boards of directors of Georgetown University, the Herbert Hoover Birthplace Foundation and the Near East Foundation.

William Joseph Baroody was born on Jan. 29, 1916, in Manchester, N.H. His parents were immigrants from the Lebanon and his father was a stone-cutter by trade. It is said that Mr. Baroody's father spoke English with a brogue because he learned the language from his Irish neighbors.

Although it is difficult to identify Mr. Baroody as the author specific positions held by the political leaders whom he advised, he was widely regarded as having been a man of influence and as a motivator of people.

"I come from a long line of conciliators," he said in an interview with The Washington Post in 1975. "In the Arab tribes, in ancient times, the Baroodys were known as the tribal conciliators."

Mr. Baroody graduated from St. Anselm's College in Manchester in 1936, doing odd jobs to help pay his way through school. He then joined the New Hampshire Unemployment Compensation Agency. After the outbreak of World War II, he joined the New Hampshire War Finance Committee and then served in the Navy as a lieutenant.

He moved to the Washington area in 1946 and took a job with the Veterans Administration. From 1950 to 1953, he was an official of the U.S. Camber of Commerce and associate editor of American Economic Security. He then began his career with what became AEI.

A member of the Melkite Greek Catholic Church, Mr. Baroody was active in church affairs for much of his life.

He was an adviser to Cardinal Patrick O'Boyle, a former archbishop of Washington, a member of the board of governors of the John Carroll Society, and chairman of the diocesan council of his own church. He also was a member of the board of advisers of the DeSales Graduate School of Theology.

If Mr. Baroody was a self-made man in the grand American tradition, he was able to help his own children make easier starts in life.

In addition to William J. Jr. of Alexandria, survivors include his wife, Nabeeha of Alexandria, where Mr. Baroody lived; two other sons, Joseph D. a partner in a Washington public relations firm, of Annandale, and Michael E. director of communications for the Republican National Committee, of Alexandria; four daughters, Helene Payne and Mary Fran Cummiskey, both of Alexandria, Anne Gallagher, of Woodbridge, and Kathy Jane, of Alexandria; a brother, Charles A. of Manchester; a sister, Adele Baroody, of Alexandria, and 37 grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the Holy Transfiguration Melkite Greek Catholic Church in Vienna, or to a charity of one's choice.