A consumer group's analysis of charitable and philanthropic spending in Washington shows almost 90 percent of the funds distributed here support social services, education, youth programs, the arts and health.

Only 7 percent is allocated to such activities as legal assistance, housing and neighborhood development, consumer affairs, natural resources and environment, energy, science and transportation and the rights of minorities, women, elderly and youth.

The analysis - titled "Where Did All the Money Go?" - is to be published today by the D.C. Community Support Fund, a nonprofit, consumer-oriented group, which says it favors support for "a broadened variety of charitable causes."

Its analysis - claimed to be the most comprehensive in city history - is based on a study of spending here in 1976 by the United Way and by 153 major Washington-based foundations.

Of $32 million distributed that year, 62 percent , or $20 million, went to organizations which serve people outside the city.

However, spokesmen for Washington-based foundations noted that many have a national mission and their charters envision little or no role in local affairs. The United Way, spokesmen commented, does spend more than half its money in the city.

Robert Jay Stein, a lawyer and spokesman for Community Support Fund, said the thrust of the analysis is that "activities which would contribute significantly to enhancing the quality of life for people in our community receive very little, or no, support from the two largest institutional funding sources in our city."

"Nobody would question that there's not enough support for D.C. needs," said Saul Richman, information officer for the Council on Foundations, a national organization of foundations.

"But you can't ecpect that support to come from foundations that happen to have a Washington address, but have a national function," Richman added.

In fact, Richman said, council figures show that $57 million is distributed in the city by foundations outside Washington, although most of the money goes to organizations with a national mission, like the Brookings Institution.

Norman Taylor, associate executive director of the United Way's membership and allocations department, said United Way does fund such activities as legal assistance, but he agreed that there are some important programs it does not support.

"The environment's a great thing, but we're dealing with people who don't have food on their table," said Taylor. "We're trying to meet community needs, and I think we're doing a pretty job."

Publication of the analysis was timed to coincide with the annual meeting in Washington this week of the Council on Foundations, which represents 26,000 philantrhopic organizations with assets of $31.5 billion.

"I hope the foundations will begin looking at this and say, 'Hey, this is the nation's capital. We'll give 15 or 20 percent more to the activities that will improve the quality of life there," said Stein.

Robert Bothwell, executive director of the National Committee for Responsive Philanthropy , said "Where Did All the Money Go?" is the most exhaustive, broad-gauged analysis of monies distributed by grant-giving institutions in one locale."

The anlysis of spending in Washington, Bothwell said, is the first of several similar studies around the nation.

In putting their report together, researchers for Community Support Fund, excluded about 100 foundations because they had assets of less than $20,000 and there were some 30 others for which records could not be located.

They found that Washington-based foundations distributed $20 million, with $14.1 outside the city and $5.9 million in the District of Columbia. Of $12.2 million distributed by United Way, $6.3 million or 52 percent was distributed in the city.

Of the $12.2 million distributed here, $10.77 million or 88.3 percent went to social services, health programs, handicapped, education and communication, arts and humanities and camps, youth clubs and scouts.