The economy is growing at a 4 percent annual rate this quarter, the fastest pace in two years and an unmistakable signal that the recession is over, the Commerce Department projected yesterday.

On the basis of partial and preliminary data for the gross national product, Commerce's Bureau of Economic Analysis reported that final sales of goods are increasing only slightly from their level in the fourth quarter of 1982. At the same time, however, production is rising as businesses seek to halt a rapid decline in inventories, BEA said.

In the fourth quarter, sales rose rapidly but production did not, so that inventories declined sharply. That set the stage for the economic turnaround.

Inflation, as measured by the fixed-weighted price index for GNP, is rising at a 2.8 percent rate this quarter, the lowest rate in 11 years. Prices rose 5 percent during 1982 by the same measure.

BEA also reported yesterday that the economy contracted at a 1.1 percent seasonally adjusted annual rate in the fourth quarter. It was the second upward revision in the GNP figures, which first showed a decline at a 2 1/2 percent rate and then at a 1.7 percent rate.

The fourth-quarter inflation rate was revised upward to a 4.9 percent rate from 4.6 percent as reported in the first revision last month. The fixed-weighted price index originally was pegged at 5.2 percent.

White House spokesman Larry Speakes called the report on the first-quarter increase in real output "excellent news and the most conclusive indication the economic recovery has begun and is proceeding at a healthy rate. We think this indicates we are moving rapidly to an excellent recovery from recession."

Treasury Secretary Donald T. Regan predicted at a press conference that the 4 percent growth figure estimated by BEA would be revised upward as more complete data become available for the quarter, which is not yet over.

Regan also said that the administration's estimate of a 3.1 percent increase in real GNP between the fourth quarter of 1982 and the fourth quarter of this year will be revised upward. Administration economists expect to complete an update of that forecast sometime early next week. It will be released in April along with some new estimates of 1983 and 1984 budget figures.

Most private economists' forecasts for economic growth this year range from 4 percent to 6 percent, and the first-quarter figure released yesterday was about in line with what most forecasters had been expecting.

Some analysts are growing concerned over the sluggish pace of consumer spending, particularly for autos. With business investment flat or declining, net exports falling and government expenditures flat except for defense purchases, the only really strong sector of the economy at the moment is residential construction.

The February reports on personal income and outlays released last week showed only small increases for both from January levels. If final sales do not start to rise more stongly, recent production gains will not continue once inventories have been stabilized or perhaps rebuilt somewhat.

Forecasters remain confident that sales will pick up soon and that the economic recovery will continue throughout the year. But even a 5 percent rise in real GNP during the year would be well below the average for the first year of most post-World War II recoveries. Civilian unemployment, which was 10.4 percent in February, easily could remain close to 10 percent late this year with such a recovery, the analysts believe.

BEA also reported yesterday that fourth-quarter corporate profits from current production rose $1.3 billion to a seasonally adjusted annual rate of $167.5 billion. After-tax profits were unchanged from the third quarter at $119.4 billion.

Domestic profits of non-financial corporations fell $7.7 billion in the fourth quarter to a $117.6 billion annual rate, compared with a $10.5 billion gain in the previous three months. Most of the fourth-quarter decline was due to widespread decreases in the profits of durable-goods manufacturers, primarily automakers, BEA said.

Between the fourth quarter of 1981 and the fourth quarter of 1982, domestic profits of non-financial corporations fell almost 15 percent. Profits of financial corporations, on the other hand, shot up 44 percent to a $29 billion annual rate.