The nation's Hispanic population totaled 18.8 million in 1987, including an estimated 2.5 million to 3.5 million illegal aliens regularly residing in the United States, the Census Bureau reported yesterday.

The population figure is 30 percent higher than the bureau estimated for 1980, partly because survey figures were adjusted to account for illegal aliens living here. The non-Hispanic population grew 6 percent in the same period.

The study found that Hispanics, 7.9 percent of the U.S. population, are younger, poorer, less well-educated and growing more rapidly than other groups.

Those of Cuban origin, in some cases middle-class and professional families who fled the Castro government years ago, tend to be the best educated, oldest and most prosperous among residents of Hispanic origin. Those of Mexican and Puerto Rican origin are the youngest and least prosperous, according to the figures.

"The population growth is coming from two factors," said Louis Descipio of the National Association of Latino Elected Officials, "immigration and the fact that Hispanic family sizes are larger and that more Hispanic families are in the younger, heavy-child-bearing age group."

The census report said the median age of Hispanic residents was 25.1 years in March, when the basic survey from which the data was obtained was taken. For non-Hispanics, the median age was 32.6.

The median income of Hispanic families was lower than that of other Americans -- $19,995 in 1986, compared with $30,231 for non-Hispanic families.

The study found 24.7 percent of Hispanic families below the government's official poverty line, compared with a non-Hispanic rate of 9.9 percent.

The 1987 figures show that about 51 percent of Hispanic adults have completed high school, lower than the 77.3 percent figure for non-Hispanic adults.