During the 1970s and early '80s it seemed that housing prices would keep rising forever, and many people made a fortune buying and selling during those years. Then the market turned nasty.

Since the late '80s, large numbers of homeowners have learned unhappily that they couldn't even get as much for their house as they paid for it. In some cases, their houses sold for tens of thousands of dollars less.Prices have stabilized in recent years in most areas, though. A federal government survey found that in the first quarter of this year, housing prices were up slightly or neutral in every state except Alaska (down 0.5 percent), Hawaii (down 2.7 percent) and Kansas (down 0.1 percent).

Utah led the way nationally over the past year - from the first quarter of 1995 to the first quarter of 1996 - with a 10.7 percent increase in the average price of a home. Since 1980, Utah ranks only 14th among the states with an average increase of 109.0 percent.

Housing prices were higher or neutral in all 50 states and the District of Columbia over the last year (first quarter 1995 to first quarter 1996). The average price increase was 5.4 percent.

The survey, by the Office of Federal Housing Enterprise Oversight, covers a wide range of houses, those whose mortgages are sold to Fannie Mae and Freddie Mac. It shows that over time, the price of your house probably will rise substantially, but you can't count on that profit, especially if you have to sell at a low point in the market.

For example, in the past five years there have been double-digit increases in housing prices in most states, enough to keep up with inflation and more. But prices actually have fallen in four states - Connecticut (down 3.9 percent), New Hampshire (down 2.5 percent), Rhode Island (down 2.9 percent) and California (down 9 percent.)

Five years is a long time to confront falling prices in the housing market. The situation was almost as bad in 10 other states that had price increases of less than 10 percent over five years, meaning housing didn't even keep up with inflation - D.C. (up 5.6 percent), Maine (up 4.1 percent), Massachusetts (up 5.4 percent), New Jersey (up 6 percent), Maryland (up 8.3 percent), New York (up 5.4 percent), Virginia (up 9.4 percent) Vermont (up 7.4 percent), Delaware (up 5.9 percent) and Hawaii (up 2.6 percent.)

For those who stay in a house long-term, though, the rewards are substantial almost everywhere. For example, in Massachusetts, which had a modest 5.4 percent rise in the past five years, prices are up a spectacular 209 percent since 1980.

Massachusetts is the only state with a price increase of more than 200 percent over 16 years, but 19 states had increases of 100 percent or more and all states had at least a double-digit increase.

The weakest performers since 1980 have been Texas, Oklahoma, Louisiana and Wyoming, each with an increase of less than 40 percent.

Is there a lesson in these numbers? Probably the best advice is to buy a house if you find one you want to live in. Home ownership is more satisfying than renting for many people.

But don't look at the house as an investment and, if possible, don't buy with less than a 10 percent down payment. With only a little equity in the house, if prices fall and you have to sell, you might have to bring cash to the closing table.

*****

ADDITIONAL INFORMATION

Housing-price trends

The following chart shows the change in housing prices by state over one year and since 1980. States are listed by rank - how well they did over the past year, from first quarter 1995 to first quarter 1996.

Percent change

State One Year Since 1980

Utah 10.7 109.0

D.C. 9.2 103.6

Oregon 8.8 114.2

S. Dakota 7.8 81.2

Wyoming 7.7 38.0

Tennessee 7.4 87.5

Colorado 6.9 98.9

Idaho 6.7 81.0

Louisiana 6.6 37.5

Michigan 6.6 93.2

N. Dakota 6.4 62.8

Montana 6.3 89.5

Georgia 6.3 92.0

Alabama 6.3 81.0

W. Virginia 6.3 63.1

Arizona 6.2 69.1

Minnesota 6.2 78.9

N. Carolina 6.1 100.8

Nevada 6.0 77.8

Mississippi 5.9 52.8

Ohio 5.9 89.2

Florida 5.9 76.7

Indiana 5.8 80.6

New Mexico 5.8 94.1

Maine 5.7 122.2

Arkansas 5.7 66.6

Kentucky 5.7 84.0

Connecticut 5.5 138.9

Massachusetts 5.5 209.4

S. Carolina 5.5 87.2

Texas 5.4 34.8

Oklahoma 5.4 25.3

Pennsylvania 5.4 120.7

United States 5.4 98.7

Nebraska 5.3 68.8

Wisconsin 5.2 90.9

Washington 5.2 127.1

New Hampshire 5.1 106.9

New Jersey 4.6 146.5

Iowa 4.4 57.4

Maryland 4.4 119.2

Kansas 4.3 51.6

Illinois 4.3 104.2

Missouri 4.3 76.2

New York 4.2 184.0

Virginia 4.2 111.9

Vermont 4.1 123.7

Rhode Island 4.0 153.4

Alaska 4.0 58.3

Delaware 3.5 139.3

California 3.3 108.6

Hawaii 0.0 171.9

Source: Office of Federal Housing Enterprise Oversight's House Price Index, First Quarter 1996