Blacks trying to rent houses or apartments encounter discrimination by rental agents three out of four times they look, according to a new studdy commissioned by the Department of Housing and Urban Development.

The study also showed that blacks trying to buy homes face discrimination by real estate agents 62 percent of the time.

"I was surprised there is still so much discrimination," said Donna E. Shalala, HUD's assistant secretary for policy development and research, which tabulated results of the $1 million study conducted by the National Committee Against Discrimination in Housing.

The findings are being released today at a fair housing conference sponsored by HUD and the committee, a nonprofit civil rights organization.

Shalala called the types of discrimination that blacks still face 10 years after passage of the Fair Housing Act "blatant" and "just the grossest things." She added, "They're the kinds of things agents could get cought and sued for."

The 1968 Fair Housing Act forbids discrimination in the sale or rental of housing units except in sales by home owners without agents or in rentals of buildings containing not more than four units, one of which is occupied by the owner.

The study was conducted last June and July in 40 metropolitan areas (not Washington's) by 300 blacks and 300 whites, who shopped in pairs for housing advertised in their local newspapers.

The results of the study do not include an evaluation of steering, a more aubtle form of discrimination in which agents direct whites to housing in white areas and blacks to housing in black areas. Fred Eggers, director of HUD's evaluation division, said that evaluation should be finished by August.

Edward L. Holmgren, executive director of the national committed, said, "We know we encountered a lot of steering, and once it's quantified, it will raise the figures on adverse treatment of blacks quite dramatically."

Holmgren said probably the most blatant example of discrimination occurred in the Vallejo-Napa area of California. "When a black couple drove up to a real estate office there, the shades went down, a 'closed' sign came up, and people inside the office ran out the back and drove off," he said.

The study found that in the first question usually asked of a rental agent - is the unit advertised available? - blacks encountered discriminatory treatment 29 percent more often than whites did.

On a similar question asked of a real estate agent - is the unit advertised for sale available? - blacks encountered discrimination in 21.5 percent more tests than whites did.

Nationally, blacks faced less discrimination in the northeast than in other parts of the country in both rental and sales. Levels of discrimination were about the same elsewhere in rentals, but in sales blacks encountered more than twice as much discrimination in the north central states as in the south or west and more than three times as much discrimination in north central states as in the northeast. A HUD official said he had no explanation for the difference.

The study found that in rental housing, whites were favored 28 percent of the time when they asked if an apartment was available, blacks were facored 12 percent of the time, and blacks and whites were treated equally 60 percent of the time.

White were favored 41 percent of the time in the number of apartments volunteered, and blacks were favored 15 percent of the time. In the number of apartment inspected, whites were favored 28 percent of the time: blacks, 16 percent.

In trying to purchase a house whites were favored 52 percent of the time in the number of houses the agent suggested they look at; blacks were favored 25 percent of the time. In the number of houses they were invited to inspect, whites were favored 46 percent of the time; blacks, 30 percent.In the number actually inspected, whites were favored 41 percent of the time; blacks, 26 percent.